| 1 | <?php |
||
| 17 | class CommandRegistry |
||
| 18 | { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $commandsRegistry = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var InterfaceDevice |
||
| 27 | */ |
||
| 28 | protected $device; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * CommandRegistry constructor. |
||
| 32 | * @param InterfaceDevice $device |
||
| 33 | */ |
||
| 34 | public function __construct(InterfaceDevice $device) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return InterfaceDevice |
||
| 41 | */ |
||
| 42 | public function getDevice(): InterfaceDevice |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param $command |
||
| 49 | * @param string $type |
||
| 50 | */ |
||
| 51 | public function setCommand($command, string $type): void |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $type |
||
| 58 | * @return mixed |
||
| 59 | */ |
||
| 60 | public function getCommand(string $type) |
||
| 68 | } |
||
| 69 |