Exemple #1
0
 /**
  * Main Exception handler
  * @param string  $message   message to display
  * @param array   $variables variables to replace in message
  * @param integer $code 	 HTTP response code to set
  */
 public function __construct($message, $variables = NULL, $code = 500)
 {
     if (is_array($variables)) {
         foreach ($variables as $key => $value) {
             $message = str_replace($key, $value, $message);
         }
     }
     $errorHandler = Core::instance()->errorHandler();
     if ($errorHandler) {
         $errorHandler->sendHttpCode($code);
     }
     return parent::__construct($message, $code);
 }
Exemple #2
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     $this->_core = Core::instance();
     return $this;
 }