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