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