예제 #1
0
파일: Simulator.php 프로젝트: jjok/Robo
 /**
  * Danger: reach through the simulated wrapper and pull out the command
  * to be executed.  This is used when using a simulated task with another
  * simulated task that runs commands, e.g. the Remote\Ssh task.  Using
  * a simulated CommandInterface task with a non-simulated task may produce
  * unexpected results (e.g. execution!).
  *
  * @return string
  *
  * @throws \Robo\Exception\TaskException
  */
 public function getCommand()
 {
     if (!$this->task instanceof CommandInterface) {
         throw new TaskException($this->task, 'Simulated task that is not a CommandInterface used as a CommandInterface.');
     }
     return $this->task->getCommand();
 }