1 | <?php |
||
14 | Trait ParsersAwareTrait |
||
15 | { |
||
16 | /** |
||
17 | * @var array|ValueParserInterface[] |
||
18 | */ |
||
19 | private $parsers = []; |
||
20 | |||
21 | |||
22 | /** |
||
23 | * @return array|Parser\ValueParserInterface[] |
||
24 | */ |
||
25 | public function getParsers() |
||
29 | |||
30 | /** |
||
31 | * @param array|Parser\ValueParserInterface[] $parsers |
||
32 | * |
||
33 | * @return $this |
||
34 | */ |
||
35 | public function setParsers($parsers) |
||
46 | |||
47 | /** |
||
48 | * Append parser to the list of parsers, LOW priority |
||
49 | * |
||
50 | * @param ValueParserInterface $parser |
||
51 | * |
||
52 | * @return $this |
||
53 | */ |
||
54 | public function appendParser(ValueParserInterface $parser) |
||
60 | |||
61 | /** |
||
62 | * Prepend parser to list of parsers, HIGH priority |
||
63 | * |
||
64 | * @param ValueParserInterface $parser |
||
65 | * |
||
66 | * @return $this |
||
67 | */ |
||
68 | public function prependParser(ValueParserInterface $parser) |
||
79 | } |