diff --git a/reference/yaf/yaf_dispatcher/registerplugin.xml b/reference/yaf/yaf_dispatcher/registerplugin.xml index db128c3e1d..d3a88ce701 100644 --- a/reference/yaf/yaf_dispatcher/registerplugin.xml +++ b/reference/yaf/yaf_dispatcher/registerplugin.xml @@ -51,16 +51,18 @@ registerPlugin($user); - } +class Bootstrap extends Yaf_Bootstrap_Abstract { + public function _initPlugin(Yaf_Dispatcher $dispatcher) { + /** + * Yaf assumes plugin scripts under [application.directory] . "/plugins" + * for this case, it will be: + * [application.directory] . "/plugins/" . "User" . [application.ext] + */ + $user = new UserPlugin(); + $dispatcher->registerPlugin($user); + } +} +?> ]]>