public function hmvc($task, $input = null, $package = null)
    {
        // If task is controller object, just execute it.
        if ($task instanceof AbstractController) {
            if (is_array($input)) {
                $input = new Input($input);
            }

            // Let's push some important data into it.
            /** @var AbstractController $controller */
            $controller = $task->setContainer($this->container)
                ->isHmvc(true)
                ->setRequest($this->request)
                ->setResponse($this->response)
                ->setPackage($this->package)
                ->setApplication($this->package->app)
                ->setInput($input);

            // Do action and return executed result.
            $result = $controller->execute();

            // Take back the redirect information.
            $this->passRedirect($controller);

            return $result;
        }

        // If task is string, find controller by package
        $package = $package ? $this->app->getPackage($package) : $this->package;

        $response = $package->execute(
            $package->getController($task, $input),
            $this->getRequest(),
            new Response(),
            true
        );

        // Take back the redirect information.
        $this->passRedirect($package->getCurrentController());

        return $response->getBody()->__toString();
    }