1 | <?php |
||
18 | class FilterChain implements FilterChainInterface |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @var FilterInterface[] |
||
23 | */ |
||
24 | protected $filters = []; |
||
25 | |||
26 | /** |
||
27 | * Add a filter to the chain |
||
28 | * |
||
29 | * @param FilterInterface $filter |
||
30 | * |
||
31 | * @return self|$this|FilterChainInterface |
||
32 | */ |
||
33 | 2 | public function add(FilterInterface $filter) |
|
38 | |||
39 | /** |
||
40 | * Returns the result of filtering $value |
||
41 | * |
||
42 | * @param mixed $value |
||
43 | * |
||
44 | * @throws Exception\CannotFilterValueException |
||
45 | * If filtering $value is impossible. |
||
46 | * |
||
47 | * @return mixed |
||
48 | */ |
||
49 | 2 | public function filter($value) |
|
58 | } |
||
59 |