Controller/Action/HelperBroker.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Controller
- Subpackage
- Zend_Controller_Action
- Version
- $Id: HelperBroker.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Controller_Action_HelperBroker
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods

__call(string $method, array $args) : mixedMethod overloading
| Name | Type | Description |
|---|---|---|
| $method | string | |
| $args | array |
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Controller_Action_Exception | if helper does not have a direct() method |

__construct(\Zend_Controller_Action $actionController) : voidConstructor
| Name | Type | Description |
|---|---|---|
| $actionController | \Zend_Controller_Action |

__get(string $name) : \Zend_Controller_Action_Helper_AbstractRetrieve helper by name as object property
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Controller_Action_Helper_Abstract |

_normalizeHelperName(string $name) : stringNormalize helper name for lookups
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| string |

addHelper(\Zend_Controller_Action_Helper_Abstract $helper) : voidaddHelper() - Add helper objects
| Name | Type | Description |
|---|---|---|
| $helper | \Zend_Controller_Action_Helper_Abstract |

addPath(string $path, string $prefix = 'Zend_Controller_Action_Helper') : voidaddPath() - Add path to repositories where Action_Helpers could be found.
| Name | Type | Description |
|---|---|---|
| $path | string | |
| $prefix | string | Optional; defaults to 'Zend_Controller_Action_Helper' |

addPrefix(string $prefix) : voidaddPrefix() - Add repository of helpers by prefix
| Name | Type | Description |
|---|---|---|
| $prefix | string |

getExistingHelper(string $name) : \Zend_Controller_Action_Helper_AbstractgetExistingHelper() - 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.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Controller_Action_Helper_Abstract |
| Exception | Description |
|---|---|
| \Zend_Controller_Action_Exception |

getExistingHelpers() : arrayReturn all registered helpers as helper => object pairs
| Type | Description |
|---|---|
| array |

getHelper(string $name) : \Zend_Controller_Action_Helper_AbstractgetHelper() - get helper by name
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Controller_Action_Helper_Abstract |

getPluginLoader() : \Zend_Loader_PluginLoaderRetrieve PluginLoader
| Type | Description |
|---|---|
| \Zend_Loader_PluginLoader |

getStack() : \Zend_Controller_Action_HelperBroker_PriorityStackLazy load the priority stack and return it
| Type | Description |
|---|---|
| \Zend_Controller_Action_HelperBroker_PriorityStack |

getStaticHelper(string $name) : \Zend_Controller_Action_Helper_AbstractRetrieve 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.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Controller_Action_Helper_Abstract |

hasHelper(string $name) : booleanIs a particular helper loaded in the broker?
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| boolean |

removeHelper(string $name) : booleanRemove a particular helper from the broker
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| boolean |

setPluginLoader(\Zend_Loader_PluginLoader_Interface $loader) : voidSet PluginLoader for use with broker
| Name | Type | Description |
|---|---|---|
| $loader | \Zend_Loader_PluginLoader_Interface |