Peridot\Console\Command::setRunner PHP Метод

setRunner() публичный Метод

Set the suite runner used by the Peridot command.
public setRunner ( Peridot\Runner\RunnerInterface $runner )
$runner Peridot\Runner\RunnerInterface
    public function setRunner(RunnerInterface $runner)
    {
        $this->runner = $runner;
        return $this;
    }

Usage Example

 /**
  * Configure the Peridot command for concurrency. Sets the runner to a concurrency runner,
  * and sets the suite loader to a concurrency suite loader.
  *
  * @param Command $command
  * @return void
  */
 protected function configureCommand(Command $command)
 {
     $broker = new MessageBroker();
     $pool = new WorkerPool($this->getConfiguration(), $this->emitter, $broker);
     $runner = new StreamSelectRunner($this->emitter, $pool);
     $command->setRunner($runner);
     $loader = new SuiteLoader($this->getConfiguration()->getGrep(), $this->emitter);
     $command->setLoader($loader);
 }