34                parent::__construct(
$config, $reserved);
 
   36                assert(
'is_array($config)');
 
   40                                if($values === 
'%replace') {
 
   41                                        $this->replace = TRUE;
 
   43                                        throw new Exception(
'Unknown flag: ' . var_export($values, TRUE));
 
   48                        if(!is_array($values)) {
 
   49                                $values = array($values);
 
   51                        foreach($values as $value) {
 
   52                                if(!is_string($value)) {
 
   53                                        throw new Exception(
'Invalid value for attribute ' . 
$name . 
': ' .
 
   54                                                var_export($values, TRUE));
 
   58                        $this->attributes[
$name] = $values;
 
   71                assert(
'is_array($request)');
 
   72                assert(
'array_key_exists("Attributes", $request)');
 
   76                foreach($this->attributes as 
$name => $values) {
 
An exception for terminatinating execution or to throw for unit testing.
process(&$request)
Apply filter to add or replace attributes.
$attributes
Attributes which should be added/appended.
$replace
Flag which indicates wheter this filter should append new values or replace old values.
__construct($config, $reserved)
Initialize this filter.