Apply the filter to modify attributes.
Modify existing attributes with the configured values.
93 assert(array_key_exists(
'Attributes',
$request));
99 if (empty($this->pattern) || empty($this->subject)) {
103 if (!$this->replace && !$this->
remove && $this->replacement ===
false) {
105 "'%remove' are set.");
108 if (!$this->replace && $this->replacement === null) {
112 if ($this->replace && $this->
remove) {
116 if (empty($this->target)) {
121 if ($this->subject !== $this->target && $this->
remove) {
125 if (!array_key_exists($this->subject,
$attributes)) {
130 if ($this->replace) {
133 if (preg_match($this->pattern, $value, $matches) > 0) {
134 $new_value = $matches[0];
136 if ($this->replacement !== FALSE) {
140 if ($this->subject === $this->target) {
147 } elseif ($this->
remove) {
148 $removedAttrs = array();
151 if (preg_match($this->pattern, $value, $matches) > 0) {
152 $removedAttrs[] = $value;
161 if ($this->subject === $this->target) {
163 $this->pattern, $this->replacement,
$target
Attribute to place the result in.
foreach($paths as $path) $request
if(array_key_exists('yes', $_REQUEST)) $attributes
$subject
Attribute to search in.
$replacement
String to replace the pattern found with.