public function setHTMLByView($view, array $parameters = array())
    {
        if (!$this->container) {
            throw new MissingTemplatingEngineException("To use this function, a Container object must be passed to the constructor (@service_container service)");
        }
        /** @var EngineInterface $engine */
        $engine = $this->container->get('templating');
        $this->setHTML($engine->render($view, $parameters));
    }