CakePHP allow you to dispatch events and listen to them since v2.1 with Cake Event System.
CakePOWER supplies a class to be extended by your Event Listener objects to interact with events easily and with some nice behaviors: PowerEventListener.
class myEventListener extends PowerEventListener {
public $events = array(
'CakePower.pluginsLoaded' => 'foo'
);
public function foo() {
debug("All plugins was loaded by CakePower!");
}
}
The first main difference from implementing CakeEventListener consist in replacing implementedEvents() method with a clean public $events class property… and this is only the first thing!






