Skip to content

Commit

Permalink
Added event "sf_cache_tagging_plugin.doctrine_configure" when doctrin…
Browse files Browse the repository at this point in the history
…e is configured by sfCacheTaggingPlugin configuration
  • Loading branch information
fruit committed May 30, 2010
1 parent 004e739 commit e78de33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions config/sfCacheTaggingPluginConfiguration.class.php
Expand Up @@ -24,10 +24,22 @@
*/
class sfCacheTaggingPluginConfiguration extends sfPluginConfiguration
{
/**
* Handy method to get type hinting in IDE's
*
* @return sfEventDispatcher
*/
public function getEventDispatcher ()
{
return $this->dispatcher;
}

public function initialize ()
{
$manager = Doctrine_Manager::getInstance();
$manager->setAttribute(Doctrine::ATTR_COLLECTION_CLASS, 'Doctrine_Collection_Cachetaggable');
$manager->setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, true);

$this->getEventDispatcher()->notify(new sfEvent($manager, 'sf_cache_tagging_plugin.doctrine_configure'));
}
}
1 change: 0 additions & 1 deletion test/functional/frontend/sfCacheTaggingPluginTest.php
Expand Up @@ -15,7 +15,6 @@

define('SF_VIEW_CACHE_MANAGER_EVENT_NAME', 'view.cache.filter_content');


$sfContext = sfContext::getInstance();

$sfContext->getConfiguration()->loadHelpers(array('Url'));
Expand Down

0 comments on commit e78de33

Please sign in to comment.