/**
  * @param Exception $exception
  * @param Report $report
  */
 protected function _processTrace(Report $report)
 {
     foreach ($this->exception->getTrace() as $t) {
         $aeTrace = new Traceback();
         $aeTrace->setFile(isset($t['file']) ? $t['file'] : 'unknown');
         $aeTrace->setFn(isset($t['class']) ? "{$t['class']}->{$t['function']}" : $t['function']);
         $aeTrace->setLine(isset($t['line']) ? $t['line'] : 0);
         $aeArgs = array();
         foreach ($t['args'] as $arg) {
             $aeArgs[] = $arg;
         }
         $aeTrace->setVars(json_encode($aeArgs));
         $report->addTraceback($aeTrace);
         unset($aeTrace);
     }
 }
示例#2
0
 /**
  * @param Report $report
  * @return \AppEnlight\Endpoint\Reports
  */
 public function addReport(Report $report)
 {
     $this->_reports[] = $report->toArray();
     return $this;
 }