コード例 #1
0
ファイル: router.class.php プロジェクト: voltrue2/pie
 public function __construct()
 {
     $this->console = Console::create('router');
     $this->reqHook = new Hook('request');
     $this->uri = $_SERVER['REQUEST_URI'];
     // make sure to get rid of query string
     $pos = strpos($this->uri, '?');
     if ($pos !== false) {
         $this->uri = substr($this->uri, 0, $pos);
     }
     // register exception handler
     ExceptionHandler::add('respondException', $this);
 }
コード例 #2
0
ファイル: consolecore.class.php プロジェクト: voltrue2/pie
 public function __construct($filePath = null, $noClient = false, $name = null, $verbose = true)
 {
     $this->phpVersion = phpversion();
     // optional to write to a file
     $this->filePath = $filePath;
     // optional to disable client logging
     $this->noClient = $noClient;
     // logger name
     $this->name = $name;
     // log level
     $this->verbose = $verbose;
     // set up a fatal error catcher
     ExceptionHandler::add('logFatalError', $this);
 }