4 use Robo\Contract\CommandInterface;
5 use Robo\Exception\TaskException;
8 * This task can receive commands from task implementing CommandInterface.
13 * @param string|\Robo\Contract\CommandInterface $command
17 * @throws \Robo\Exception\TaskException
19 protected function receiveCommand($command)
21 if (!is_object($command)) {
24 if ($command instanceof CommandInterface) {
25 return $command->getCommand();
27 throw new TaskException($this, get_class($command) . " does not implement CommandInterface, so can't be passed into this task");