/** * returns all observers of a given observable and event * * @param Tinebase_Record_Interface $_observable * @param string _event * @return Tinebase_Record_RecordSet */ protected function getObserversByEvent($_observable, $_event) { if (!$_observer->getApplication() || !$_observer->getId()) { throw new Tinebase_Exception_Record_DefinitionFailure(); } $where = array($this->_db->quoteIdentifier('observable_application') . ' =' . $_observable->getApplication(), $this->_db->quoteIdentifier('observable_identifier') . ' =' . $_observable->getId(), $this->_db->quoteIdentifier('observed_event') . ' =' . $this->_db->getAdapter()->quote($_event)); return new Tinebase_Record_RecordSet('Tinebase_Model_PersistentObserver', $this->_db->fetchAll($where), true); }