public function postSave(Doctrine_Event $event) { $record = $event->getInvoker(); if (array_key_exists($model = get_class($record), $this->configuration) && !$this->isRecordProcessed($record)) { $this->processCacheInvalidation($record, $this->configuration[$model]); $this->setRecordProcessed($record); $event->skipOperation(); } }
/** * Skip the normal delete options so we can override it with our own * * @param Doctrine_Event $event * @return void */ public function preDelete(Doctrine_Event $event) { $name = $this->_options['name']; $invoker = $event->getInvoker(); if ($this->_options['type'] == 'timestamp') { $invoker->{$name} = date('Y-m-d H:i:s', time()); } else { if ($this->_options['type'] == 'boolean') { $invoker->{$name} = true; } } $event->skipOperation(); }
public function processEvent(Doctrine_Event $event, $skip = false) { if (!self::$enabled) { return; } $record = $event->getInvoker(); if (!array_key_exists(get_class($record), $this->configuration) || $this->isRecordProcessed($record)) { return; } $this->processCacheInvalidation($record); $this->setRecordProcessed($record); if (true === $skip) { $event->skipOperation(); } }
/** * Skip the normal delete options so we can override it with our own * * @param Doctrine_Event $event * @return void */ public function preDelete(Doctrine_Event $event) { $event->skipOperation(); }
/** * Skip the normal delete options so we can override it with our own * * @param Doctrine_Event $event * @return void */ public function preDelete(Doctrine_Event $event) { $name = $this->_options['name']; $event->getInvoker()->{$name} = date('Y-m-d H:i:s', time()); $event->skipOperation(); }
public function preSavepointCreate(Doctrine_Event $event) { $this->_messages[] = __FUNCTION__; $event->skipOperation(); }