protected function _beforeSend(DispatcherContext $context)
    {
        $response = $context->getResponse();

        if(!$response->isDownloadable())
        {
            foreach ($this->getDecorators() as $decorator)
            {
                //Get the decorator
                $config     = array('response' => array('content' => $response->getContent()));
                $controller = $this->getObject($decorator, $config);

                if(!$controller instanceof ControllerViewable)
                {
                    throw new \UnexpectedValueException(
                        'Decorator '.get_class($controller).' does not implement ControllerViewable'
                    );
                }

                //Set the view
                $parameters = array(
                    'language' => $this->getLanguage(),
                );

                if($response->isError()) {
                    $parameters['status'] = $response->getStatusCode();
                } else {
                    $parameters['component'] = $this->getController()->getIdentifier()->package;
                }

                $controller->getView()
                    ->setParameters($parameters)
                    ->getTemplate()->addFilter('decorator');

                //Set the response
                $response->setContent($controller->render());
            }
        }
    }