| 1 | <?php |
||
| 5 | class ReporterFactory |
||
| 6 | { |
||
| 7 | protected $reporters = []; |
||
| 8 | |||
| 9 | public static function create() |
||
| 15 | |||
| 16 | public function __construct(array $reporters = []) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param string $format |
||
| 25 | * @param Reporter $reporter |
||
| 26 | */ |
||
| 27 | public function registerReporter($format, Reporter $reporter) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $format |
||
| 34 | * @return Reporter |
||
| 35 | * |
||
| 36 | * @throws \LogicException If no reporter is registered for the given format. |
||
| 37 | */ |
||
| 38 | public function getReporter($format) |
||
| 46 | } |
||
| 47 |