Created
July 30, 2012 13:58
-
-
Save Floby/3207066 to your computer and use it in GitHub Desktop.
Connecting signals in Centurion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Search_Bootstrap extends Centurion_Application_Module_Bootstrap | |
{ | |
protected function _initSignals() | |
{ | |
Centurion_Signal::factory('post_delete')->connect(array($this, 'postDeleteRow'), 'Centurion_Db_Table_Row_Abstract'); | |
} | |
public function postDeleteRow() | |
{ | |
$args = func_get_args(); | |
/* $signal = */array_shift($args); | |
$sender = array_shift($args); | |
if (Search_Model_Manager::deleteRow($sender)) { | |
$this->getApplication()->getResource('cachemanager')->cleanCache(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array('search')); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment