(Yaf >=1.0.0)
Yaf_Dispatcher::registerPlugin — Register a plugin
Register a plugin(see Yaf_Plugin_Abstract). Generally, we register plugins in Bootstrap(see Yaf_Bootstrap_Abstract).
plugin
Example #1 Yaf_Dispatcher::registerPlugin() example
<?php
class Bootstrap extends Yaf_Bootstrap_Abstract {
public function _initPlugin(Yaf_Dispatcher $dispatcher) {
$user = new UserPlugin();
$dispatcher->registerPlugin($user);
}
}
?>