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'); }
/** * Returns the current application (admin|front for example). * * @return string */ public function getApplication() { return $this->context->getConfiguration()->getApplication(); }