Fixing test and implementing return values for events

This commit is contained in:
Jose Lorenzo Rodriguez 2011-12-25 21:52:12 -04:30
parent 078a2dfd72
commit ffa12f4d47
7 changed files with 91 additions and 26 deletions

View file

@ -117,10 +117,8 @@ class ComponentCollection extends ObjectCollection implements CakeEventListener
*/
public function implementedEvents() {
return array(
'Controller.startup' => array(
array('callable' => 'trigger', 'priority' => 9),
array('callable' => 'trigger')
),
'Controller.initialize' => array('callable' => 'trigger'),
'Controller.startup' => array('callable' => 'trigger'),
'Controller.beforeRender' => array('callable' => 'trigger'),
'Controller.beforeRedirect' => array('callable' => 'trigger'),
'Controller.shutdown' => array('callable' => 'trigger', 'priority' => 9),

View file

@ -591,7 +591,6 @@ class Controller extends Object implements CakeEventListener {
return array(
'Controller.startup' => 'beforeFilter',
'Controller.beforeRender' => 'beforeRender',
'Controller.beforeRedirect' => array('callable' => 'beforeRedirect', 'passParams' => true),
'Controller.shutdown' => 'afterFilter'
);
}
@ -643,6 +642,7 @@ class Controller extends Object implements CakeEventListener {
* @return void
*/
public function startupProcess() {
$this->getEventManager()->dispatch(new CakeEvent('Controller.initialize', $this));
$this->getEventManager()->dispatch(new CakeEvent('Controller.startup', $this));
}