private function doHandle(Args $args, IO $io) { if ($this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::PRE_HANDLE)) { $event = new PreHandleEvent($args, $io, $this); $this->dispatcher->dispatch(ConsoleEvents::PRE_HANDLE, $event); if ($event->isHandled()) { return $event->getStatusCode(); } } $commandHandler = $this->config->getHandler(); $handlerMethod = $this->config->getHandlerMethod(); return $commandHandler->{$handlerMethod}($args, $io, $this); }
public function testGetHandlerMethodReturnsApplicationHandlerByDefault() { $this->applicationConfig->setHandlerMethod('method'); $this->assertSame('method', $this->config->getHandlerMethod()); }