private function handle($command) { $request = new Request($command); $response = new Response(); $name = $request->getName(); if (!empty($name)) { if ($this->hasCommand($name)) { $command = $this->getCommand($name); $handler = $command->getHandler(); call_user_func_array($handler, [$request, $response]); } else { $command = $request->getCommand(); passthru($command); $response->line(); //echo "command '{$name}' not found\n"; } } }