예제 #1
0
 /**
  * Returns the absolute location of this context.
  * @return string
  */
 public function url()
 {
     return $this->env->url();
 }
 /**
  * Send the error to the logger.
  * @param EXCEPTION_SIGNATURE $sig
  * @param string $msg
  * @access private
  */
 public function dispatch($sig, $msg)
 {
     if ($this->env->is_http_server() && $this->env->buffered() && $this->env->exception_handler_page) {
         $current_url = $this->env->url();
         $handler_url = $this->env->resolve_file($this->env->exception_handler_page);
         if (strpos($current_url, $handler_url) === false) {
             $parameters = $sig->as_query_string();
             $this->env->redirect_root($handler_url . '?' . $parameters);
         } else {
             parent::dispatch($sig, $msg);
         }
     } else {
         parent::dispatch($sig, $msg);
     }
 }