Esempio n. 1
0
 /**
  * Call controller action method
  * @return void 
  */
 public function callAction()
 {
     // Only call the method if the user is authenticated
     if ($this->checkAuthenticated($this->getArg('session_id'))) {
         parent::callAction();
     }
 }
Esempio n. 2
0
 /**
  * Set error response
  * By default $httpCode will be the same as $code
  * @param \Sonic\Controller\Error|integer|string $message Error message object, error code or message string
  * @param integer $code Error code, only used if message is a string
  * @param integer $httpCode HTTP status code
  * @return FALSE
  */
 protected function error($message = 'invalid request', $code = 0, $httpCode = FALSE)
 {
     if ($httpCode === FALSE) {
         $httpCode = $code;
     }
     return parent::error($message, $code, $httpCode);
 }