/**
  * Automatically called by the controller instance whenever
  * an exception was thrown and not trapped in a catch clause.
  * Since this controller supports conjoonContext, the format
  * of the values assigned to the view-variables may differ depending
  * on the format used (e.g. json encoded sting for context 'json').
  */
 public function errorAction()
 {
     /**
      * @see Conjoon_Controller_DispatchHelper
      */
     require_once 'Conjoon/Controller/DispatchHelper.php';
     $exception = $this->_getParam('error_handler')->exception;
     $result = Conjoon_Controller_DispatchHelper::transformExceptions(array($exception));
     $this->getResponse()->clearBody();
     $userId = $this->_helper->registryAccess()->getUserId();
     /**
      * @see Conjoon_Modules_Default_Registry_Facade
      */
     require_once 'Conjoon/Modules/Default/Registry/Facade.php';
     $this->view->title = Conjoon_Modules_Default_Registry_Facade::getInstance()->getValueForKeyAndUserId('/base/conjoon/name', $userId);
     foreach ($result as $key => $value) {
         $this->view->{$key} = $value;
     }
 }
 /**
  * Copies an exception found in the response of the initial request
  * into the responses of teh requests found in the requestStack.
  *
  *
  * @param Zend_Controller_Response_Abstract $response
  */
 protected function _mergeInitException(Zend_Controller_Response_Abstract $response)
 {
     /**
      * @see Conjoon_Controller_DispatchHelper
      */
     require_once 'Conjoon/Controller/DispatchHelper.php';
     $result = Conjoon_Controller_DispatchHelper::mergeExceptions($response->getException());
     $response->clearBody();
     $response->setBody(Zend_Json::encode($result));
 }
Exemple #3
0
     */
    require_once 'Conjoon/Controller/Plugin/ExtRequest.php';
    $extDirect = new Conjoon_Controller_Plugin_ExtRequest(array('extParameter' => $config->application->ext->direct->request->parameter, 'additionalHeaders' => array('Content-Type' => 'application/json'), 'additionalParams' => array('format' => 'json'), 'action' => 'multi.request', 'controller' => 'ext', 'module' => 'default', 'singleException' => $config->application->ext->direct->request->singleException));
    Zend_Registry::set(Conjoon_Keys::EXT_REQUEST_OBJECT, $extDirect);
    $extDirect->registerPlugins();
}
// add helper namespace
Zend_Controller_Action_HelperBroker::addPrefix('Conjoon_Controller_Action_Helper');
/*@REMOVE@*/
// set the connection check default properties
if ($config->application->connection_check->enabled) {
    $c =& $config->application->connection_check;
    /**
     * @see Conjoon_Controller_Action_Helper_ConnectionCheck
     */
    require_once 'Conjoon/Controller/Action/Helper/ConnectionCheck.php';
    Conjoon_Controller_Action_Helper_ConnectionCheck::setConfig(array('enabled' => true, 'ip' => $c->ip, 'port' => $c->port, 'timeout' => $c->timeout));
}
/*@REMOVE@*/
// +----------------------------------------------------------------------------
// | Set up Routing
// +----------------------------------------------------------------------------
// +----------------------------------------------------------------------------
// | We are all set, dispatch!
// +----------------------------------------------------------------------------
/**
 * @see Conjoon_Controller_DispatchHelper
 */
require_once 'Conjoon/Controller/DispatchHelper.php';
Conjoon_Controller_DispatchHelper::dispatch();