Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Zend_Controller_Action_HelperBroker Class Reference

Public Member Functions

 __construct (Zend_Controller_Action $actionController)
 Constructor.
 
 notifyPreDispatch ()
 notifyPreDispatch() - called by action controller dispatch method
 
 notifyPostDispatch ()
 notifyPostDispatch() - called by action controller dispatch method
 
 getHelper ($name)
 getHelper() - get helper by name
 
 __call ($method, $args)
 Method overloading.
 
 __get ($name)
 Retrieve helper by name as object property.
 

Static Public Member Functions

static setPluginLoader ($loader)
 Set PluginLoader for use with broker.
 
static getPluginLoader ()
 Retrieve PluginLoader.
 
static addPrefix ($prefix)
 addPrefix() - Add repository of helpers by prefix
 
static addPath ($path, $prefix= 'Zend_Controller_Action_Helper')
 addPath() - Add path to repositories where Action_Helpers could be found.
 
static addHelper (Zend_Controller_Action_Helper_Abstract $helper)
 addHelper() - Add helper objects
 
static resetHelpers ()
 resetHelpers()
 
static getStaticHelper ($name)
 Retrieve or initialize a helper statically.
 
static getExistingHelper ($name)
 getExistingHelper() - get helper by name
 
static getExistingHelpers ()
 Return all registered helpers as helper => object pairs.
 
static hasHelper ($name)
 Is a particular helper loaded in the broker?
 
static removeHelper ($name)
 Remove a particular helper from the broker.
 
static getStack ()
 Lazy load the priority stack and return it.
 

Static Protected Member Functions

static _normalizeHelperName ($name)
 Normalize helper name for lookups.
 
static _loadHelper ($name)
 Load a helper.
 

Protected Attributes

 $_actionController
 

Static Protected Attributes

static $_pluginLoader
 
static $_stack = null
 

Constructor & Destructor Documentation

__construct ( Zend_Controller_Action  $actionController)

Constructor.

Parameters
Zend_Controller_Action$actionController
Returns
void

Member Function Documentation

__call (   $method,
  $args 
)

Method overloading.

Parameters
string$method
array$args
Returns
mixed
Exceptions
Zend_Controller_Action_Exceptionif helper does not have a direct() method
__get (   $name)

Retrieve helper by name as object property.

Parameters
string$name
Returns
Zend_Controller_Action_Helper_Abstract
static _loadHelper (   $name)
staticprotected

Load a helper.

Parameters
string$name
Returns
void
static _normalizeHelperName (   $name)
staticprotected

Normalize helper name for lookups.

Parameters
string$name
Returns
string
static addHelper ( Zend_Controller_Action_Helper_Abstract  $helper)
static

addHelper() - Add helper objects

Parameters
Zend_Controller_Action_Helper_Abstract$helper
Returns
void
static addPath (   $path,
  $prefix = 'Zend_Controller_Action_Helper' 
)
static

addPath() - Add path to repositories where Action_Helpers could be found.

Parameters
string$path
string$prefixOptional; defaults to 'Zend_Controller_Action_Helper'
Returns
void
static addPrefix (   $prefix)
static

addPrefix() - Add repository of helpers by prefix

Parameters
string$prefix
static getExistingHelper (   $name)
static

getExistingHelper() - get helper by name

Static method to retrieve helper object. Only retrieves helpers already initialized with the broker (either via addHelper() or on-demand loading via getHelper()).

Throws an exception if the referenced helper does not exist in the stack; use hasHelper() to check if the helper is registered prior to retrieving it.

Parameters
string$name
Returns
Zend_Controller_Action_Helper_Abstract
Exceptions
Zend_Controller_Action_Exception
static getExistingHelpers ( )
static

Return all registered helpers as helper => object pairs.

Returns
array
getHelper (   $name)

getHelper() - get helper by name

Parameters
string$name
Returns
Zend_Controller_Action_Helper_Abstract
static getPluginLoader ( )
static

Retrieve PluginLoader.

Returns
Zend_Loader_PluginLoader
static getStack ( )
static

Lazy load the priority stack and return it.

Returns
Zend_Controller_Action_HelperBroker_PriorityStack
static getStaticHelper (   $name)
static

Retrieve or initialize a helper statically.

Retrieves a helper object statically, loading on-demand if the helper does not already exist in the stack. Always returns a helper, unless the helper class cannot be found.

Parameters
string$name
Returns
Zend_Controller_Action_Helper_Abstract
static hasHelper (   $name)
static

Is a particular helper loaded in the broker?

Parameters
string$name
Returns
boolean
notifyPostDispatch ( )

notifyPostDispatch() - called by action controller dispatch method

Returns
void
notifyPreDispatch ( )

notifyPreDispatch() - called by action controller dispatch method

Returns
void
static removeHelper (   $name)
static

Remove a particular helper from the broker.

Parameters
string$name
Returns
boolean
static resetHelpers ( )
static

resetHelpers()

Returns
void
static setPluginLoader (   $loader)
static

Set PluginLoader for use with broker.

Parameters
Zend_Loader_PluginLoader_Interface$loader
Returns
void

Member Data Documentation

$_actionController
protected
$_pluginLoader
staticprotected
$_stack = null
staticprotected