本文整理匯總了PHP中Doctrine_Event::skipOperation方法的典型用法代碼示例。如果您正苦於以下問題:PHP Doctrine_Event::skipOperation方法的具體用法?PHP Doctrine_Event::skipOperation怎麽用?PHP Doctrine_Event::skipOperation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Doctrine_Event
的用法示例。
在下文中一共展示了Doctrine_Event::skipOperation方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: postSave
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();
}
}
開發者ID:jeremyb,項目名稱:akDoctrineTemplateCacheInvaliderPlugin,代碼行數:9,代碼來源:akTemplateCacheInvaliderListener.class.php
示例2: preDelete
/**
* 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();
}
示例3: processEvent
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();
}
}
開發者ID:n1k0,項目名稱:akDoctrineTemplateCacheInvaliderPlugin,代碼行數:15,代碼來源:akTemplateCacheInvaliderListener.class.php
示例4: preDelete
/**
* 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();
}
示例5: preDelete
/**
* 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();
}
示例6: preSavepointCreate
public function preSavepointCreate(Doctrine_Event $event)
{
$this->_messages[] = __FUNCTION__;
$event->skipOperation();
}