예제 #1
0
 public function __construct(Exception $e, dmContext $context)
 {
     $this->exception = $e;
     $this->class = get_class($e);
     $this->name = $e->getMessage() ? $e->getMessage() : 'n/a';
     $this->module = $context->getModuleName();
     $this->action = $context->getActionName();
     $this->uri = $context->getRequest()->getUri();
     $env = 'n/a';
     if ($conf = $context->getConfiguration()) {
         $env = $conf->getEnvironment();
     }
     $this->env = $env;
     $this->date = date('H:i:s j F Y');
 }
예제 #2
0
 /**
  * Returns the current application (admin|front for example).
  *
  * @return string
  */
 public function getApplication()
 {
     return $this->context->getConfiguration()->getApplication();
 }