protected function render(ResponseInterface $response)
    {
        $stream = new Stream('php://memory', 'rw+');
        $content = $this->getEngine()
            ->parse($this->getTemplate())
            ->process($this->getData())
        ;
        $stream->write($content);

        $response = $response->withBody($stream);
        return $response;
    }