Ejemplo n.º 1
0
 /**
  * Process condition and do action
  * @param Audit $audit Audit ORM
  * @param Handler $handler Handler ORM
  * @return boolean Return TRUE if successful, FALSE otherwise
  */
 public function process(Audit $audit)
 {
     $this->_populateHandlers();
     $ret = true;
     foreach ($this->_handlers as $handler) {
         $result = $this->_doProcess($handler, $audit);
         if ($result === false) {
             // log processing errors
             $processingError = new ProcessingError();
             $processingError->_shouldAudit = false;
             $processingError->auditId = $audit->auditId;
             $processingError->handlerId = $handler->handlerId;
             $processingError->persist();
         }
         $ret &= $result;
     }
     return $ret;
 }
Ejemplo n.º 2
0
 /**
  * Process condition and do action
  * @param Handler $handler Handler ORM
  * @param Audit $audit Audit ORM
  * @return boolean Return TRUE if successful, FALSE otherwise
  */
 public function process(Audit $audit)
 {
     $this->_populateHandlers();
     $data = DataIntegration::handlerSSSourceData($audit);
     if (isset($data['_audit'])) {
         DataIntegration::handlerSSAct($audit, $data);
     }
     $ret = true;
     foreach ($this->_handlers as $handler) {
         $result = $this->_doProcess($handler, $audit);
         if ($result === false) {
             // log processing errors
             $processingError = new ProcessingError();
             $processingError->_shouldAudit = false;
             $processingError->auditId = $audit->auditId;
             $processingError->handlerId = $handler->handlerId;
             $processingError->persist();
         }
         $ret |= $result;
     }
     return $ret;
 }