downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Yaf_Dispatcher::returnResponse> <Yaf_Dispatcher::initView
[edit] Last updated: Fri, 17 May 2013

view this page in

Yaf_Dispatcher::registerPlugin

(Yaf >=1.0.0)

Yaf_Dispatcher::registerPluginRegister a plugin

Description

public Yaf_Dispatcher Yaf_Dispatcher::registerPlugin ( Yaf_Plugin_Abstract $plugin )

Register a plugin(see Yaf_Plugin_Abstract). Generally, we register plugins in Bootstrap(see Yaf_Bootstrap_Abstract).

Parameters

plugin

Return Values

Examples

Example #1 Yaf_Dispatcher::registerPlugin()example

<?php
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);
  }
}
?>


add a note add a note User Contributed Notes Yaf_Dispatcher::registerPlugin - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites