Ejemplo n.º 1
0
 public function errorAction()
 {
     $this->_helper->layout->setLayout('entrance');
     $errors = $this->_getParam('error_handler');
     switch ($errors->type) {
         case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
         case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
         case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
             // 404 error -- controller or action not found
             $this->getResponse()->setHttpResponseCode(404);
             $this->view->code = 404;
             $this->view->message = $this->_translate->_('error_404');
             break;
         default:
             // application error
             $this->getResponse()->setHttpResponseCode(500);
             $this->view->code = 500;
             $this->view->message = $this->_translate->_('error_500');
             break;
     }
     Application_Model_CronRepository::getInstance()->error($this->getResponse()->getHttpResponseCode(), $errors->exception->getMessage());
     // Log exception, if logger available
     if ($log = $this->getLog()) {
         $log->crit($this->view->message, $errors->exception);
     }
     // conditionally display exceptions
     if ($this->getInvokeArg('displayExceptions') == true) {
         $this->view->exception = $errors->exception;
     }
     $this->view->request = $errors->request;
 }
Ejemplo n.º 2
0
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
         self::$_instance->_table = 'cron';
     }
     return self::$_instance;
 }
Ejemplo n.º 3
0
 public function noaccessAction()
 {
     Application_Model_CronRepository::getInstance()->noaccess(urldecode($this->getParam('from')));
 }