public function run($return = false)
    {
        $output = "";

        foreach ($this->stack as $view) { /** @var View $view */
            $data = $view->getData();

            if (! is_array($data)) {
                $data = array();
            }

            if ($view->getType() === View::PART_BODY_PLACEHOLDER) {
                throw new RendererException("The body placeholder isn't replaced!"); // @codeCoverageIgnore
            }

            if (! empty($this->globalData)) {
                $data = array_merge($data, $this->globalData);
            }

            $engineClass = $view->getEngine();
            /** @var RendererInterface $engine */
            $engine = $engineClass->newInstance();

            if (! $engine instanceof RendererInterface) { // @codeCoverageIgnore
                throw new RendererException("Engine is not instance of the RendererInterface."); // @codeCoverageIgnore
            } // @codeCoverageIgnore

            // Render it!
            $output .= $engine->render($view, $data);
        }

        // If we need to return. Then just return it.
        if ($return) {
            return $output;
        }

        // Instead, create response object and return it.
        return new Response($output, 200); // @codeCoverageIgnore
    }