Racionalidade e a sensibilidade em cada processo.

Symfony – Doctrine – Alterando Listener em Tempo de execução

Posted: janeiro 16th, 2012 | Author: | Filed under: Symfony | No Comments »

$object->getListener()->setOption('disabled',true);

ou

$manager->setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, false);

 

$old_dqlc = Doctrine_Manager::getInstance()->getAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS);
Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, false);
$record->delete();
Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, $old_dqlc);