/**
  * Register this error handler
  */
 public function register()
 {
     $this->unregister();
     ini_set('display_errors', false);
     set_exception_handler([$this, 'handleException']);
     set_error_handler([$this, 'handleError']);
     if ($this->memoryReserveSize > 0) {
         $this->_memoryReserve = str_repeat('x', $this->memoryReserveSize);
     }
     AppServer::getInstance()->on(AppServer::EVENT_AFTER_REQUEST, [[$this, 'handleFatalError']]);
 }
Beispiel #2
0
 public function init()
 {
     AppServer::getInstance()->on(AppServer::EVENT_AFTER_WORKER_STOP, [$this, 'flush', true]);
 }