public function getCommand($name) { if (!isset($this->commands[$name])) { throw new ConsoleException("Command '{$name}' does not exist"); } return $this->commands[$name]; }