1 | <?php |
||
14 | class CheckerFactory |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Backwards compatibility checkers. |
||
19 | * |
||
20 | * @var AbstractChecker[] |
||
21 | */ |
||
22 | protected $checkers = array(); |
||
23 | |||
24 | /** |
||
25 | * Adds backwards compatibility checker. |
||
26 | * |
||
27 | * @param AbstractChecker $bc_checker Backwards compatibility checker. |
||
28 | * |
||
29 | * @return void |
||
30 | * @throws \LogicException When backwards compatibility checker is already added. |
||
31 | */ |
||
32 | public function add(AbstractChecker $bc_checker) |
||
44 | |||
45 | /** |
||
46 | * Gets backwards compatibility checker by name. |
||
47 | * |
||
48 | * @param string $name Backwards compatibility checker name. |
||
49 | * |
||
50 | * @return AbstractChecker |
||
51 | * @throws \LogicException When Backwards compatibility checker wasn't found. |
||
52 | */ |
||
53 | public function get($name) |
||
63 | |||
64 | } |
||
65 |