protected function disableViewAndLayout()
    {
        $layoout = \Zend_Layout::getMvcInstance();
        if (null !== $layoout) {
            $layoout->disableLayout();
        }

        $view = \Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        if (null !== $view) {
            $view->setNoRender(true);
        }

        return $this;
    }