route.pre
route
route.error
route.post
dispatch.pre
dispatch
dispatch.send
dispatch.post
dispatch.error
public detachEvent ( string $name, mixed $action ) : |
||
$name | string | |
$action | mixed | |
return |
public function testEventManager() { $func = function () { return 'Hello World'; }; $p = new Project(); $p->attachEvent('route.pre', $func, 2); $this->assertEquals(1, count($p->getEventManager()->get('route.pre'))); $p->detachEvent('route.pre', $func); $this->assertEquals(0, count($p->getEventManager()->get('route.pre'))); }