Ejemplo n.º 1
0
 /**
  * Handle http exceptions
  *
  * @param UnknownHttpExceptionEvent $event
  */
 public function onException(UnknownHttpExceptionEvent $event)
 {
     if (!$this->environment->equals(Environment::DEVELOPMENT)) {
         return;
     }
     $event->stopPropagation();
     $this->whoops->writeToOutput(false);
     $this->whoops->allowQuit(false);
     $content = $this->whoops->handleException($event->getHttpException());
     $event->getResponse()->setContent($content);
 }
Ejemplo n.º 2
0
 /**
  * Handle power up event
  *
  * @param SimpleEvent $e
  */
 public function onPowerUp(SimpleEvent $e)
 {
     if (getenv('THINFRAME_ENVIRONMENT')) {
         $this->environment->setValue(getenv('THINFRAME_ENVIRONMENT'));
     }
 }