public function getCustomIterator($dbSelect = null) { if ($dbSelect === null) { $db = Zend_Registry::get('dbAdapter'); $handlerSelect = $db->select()->from('handlers', 'dataIntegrationDatasourceId')->where('handlerType = ?', $this->handlerType); $dbSelect = $db->select()->from($this->_table)->where('handlerType = ?', $this->handlerType)->where('dataIntegrationDatasourceId NOT IN ( ' . $handlerSelect->__toString() . ' )', $this->handlerType)->order('name'); } return parent::getIterator($dbSelect); }
public function __construct($handlerType = 0) { parent::__construct($handlerType); $this->dataIntegrationDatasource = new DataIntegrationDatasource($handlerType); $this->dataIntegrationDatasource->_cascadePersist = false; $this->dataIntegrationTemplate = new DataIntegrationTemplate($handlerType); $this->dataIntegrationTemplate->_cascadePersist = false; $this->dataIntegrationDestination = new DataIntegrationDestination($handlerType); $this->dataIntegrationDestination->_cascadePersist = false; $this->dataIntegrationAction = new DataIntegrationAction($handlerType); $this->dataIntegrationAction->_cascadePersist = false; }
/** * 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; }