public function execute(Container $container) { // Inject route params (if any) in input Input::load($this->params); $this->mutateAction($container); $this->result = call_user_func_array($this->action, $this->params); if (is_string($this->result)) { $stringResult = $this->result; $this->result = new ClosureRenderable(function ($c) use($stringResult) { $c['response']->setContent($stringResult); }); return $this->result; } else { if (is_object($this->result) && in_array('Vexillum\\Rendering\\RenderableInterface', class_implements($this->result))) { return $this->result; } } throw new InvalidRouteResultException(); }