1 | <?php |
||
18 | class ProcessorFactory implements ProcessorFactoryInterface |
||
19 | { |
||
20 | /** |
||
21 | * Array of registered command processors. |
||
22 | * |
||
23 | * @var CommandProcessorInterface[] |
||
24 | */ |
||
25 | private $commandTypes = array(); |
||
26 | |||
27 | /** |
||
28 | * Logger instance. |
||
29 | * |
||
30 | * @var LoggerInterface |
||
31 | */ |
||
32 | private $logger; |
||
33 | |||
34 | /** |
||
35 | * Class constructor. |
||
36 | * |
||
37 | * @param LoggerInterface $logger |
||
38 | */ |
||
39 | 12 | public function __construct(LoggerInterface $logger = null) |
|
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | 7 | public function registerProcessorForCommand($commandClassName, CommandProcessorInterface $service) |
|
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | 7 | public function getProcessor(CommandInterface $command) |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 1 | public function hasProcessor($commandClassName) |
|
81 | } |
||
82 |