/** * Start the console application * * @return int 0 if everything went fine, or an error code */ public function run() { $this->configuration->apply($this->injector); $application = $this->injector->make(ConsoleApplication::class); array_map(function ($command) use($application) { $application->add($this->injector->make($command)); }, $this->commands->toArray()); return $application->run(); }
public function testSetObject() { $config = $this->getMock(ConfigurationInterface::class); $injector = $this->getMock(Injector::class); $config->expects($this->once())->method('apply')->with($injector); $set = new ConfigurationSet([$config]); $set->apply($injector); }
/** * Run the application * * @param string $runner * * @return \Psr\Http\Message\ResponseInterface */ public function run($runner = 'Relay\\Relay') { $this->configuration->apply($this->injector); return $this->injector->share($this->middleware)->prepare('Equip\\Directory', $this->routing)->execute($runner); }
/** * Run the application * * @param string $runner * * @return \Psr\Http\Message\ResponseInterface */ public function run($runner = Relay::class) { $this->configuration->apply($this->injector); return $this->injector->share($this->middleware)->prepare(Directory::class, $this->routing)->execute($runner); }