| 1 | <?php |
||
| 7 | class CommandNameMatcher implements MatcherInterface |
||
| 8 | { |
||
| 9 | protected $commandName; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @param string|null $commandName |
||
| 13 | */ |
||
| 14 | 16 | public function __construct($commandName = null) |
|
| 18 | |||
| 19 | /** |
||
| 20 | * @param CommandInterface $command |
||
| 21 | * |
||
| 22 | * @return bool |
||
| 23 | */ |
||
| 24 | 5 | public function matches(CommandInterface $command) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @param $command |
||
| 31 | * |
||
| 32 | * @return $this |
||
| 33 | */ |
||
| 34 | 6 | public function setCommandName($command) |
|
| 35 | { |
||
| 36 | 6 | $this->commandName = $command; |
|
| 37 | |||
| 38 | 6 | return $this; |
|
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return null|string |
||
| 43 | */ |
||
| 44 | 6 | public function getCommandName() |
|
| 48 | } |
||
| 49 |