Controller/Action/HelperBroker.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Controller  
Subpackage
Zend_Controller_Action  
Version
$Id$  

\Zend_Controller_Action_HelperBroker

Package: Zend_Controller\Zend_Controller_Action
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotected\Zend_Controller_Action $_actionController
$_actionController - ActionController reference
>VPropertyprotected\Zend_Loader_PluginLoader_Interface $_pluginLoader
static
>VPropertyprotected\Zend_Controller_Action_HelperBroker_PriorityStack $_stack = null
static
$_helpers - Helper array

Methods

methodpublic__call(string $method, array $args) : mixed

Method overloading

Parameters
NameTypeDescription
$methodstring
$argsarray
Returns
TypeDescription
mixed
Throws
ExceptionDescription
\Zend_Controller_Action_Exceptionif helper does not have a direct() method
methodpublic__construct(\Zend_Controller_Action $actionController) : void

Constructor

Parameters
NameTypeDescription
$actionController\Zend_Controller_Action
methodpublic__get(string $name) : \Zend_Controller_Action_Helper_Abstract

Retrieve helper by name as object property

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
\Zend_Controller_Action_Helper_Abstract
methodprotected_loadHelper(string $name) : void
static

Load a helper

Parameters
NameTypeDescription
$namestring
methodprotected_normalizeHelperName(string $name) : string
static

Normalize helper name for lookups

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
string
methodpublicaddHelper(\Zend_Controller_Action_Helper_Abstract $helper) : void
static

addHelper() - Add helper objects

Parameters
NameTypeDescription
$helper\Zend_Controller_Action_Helper_Abstract
methodpublicaddPath(string $path, string $prefix = 'Zend_Controller_Action_Helper') : void
static

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

Parameters
NameTypeDescription
$pathstring
$prefixstring

Optional; defaults to 'Zend_Controller_Action_Helper'

methodpublicaddPrefix(string $prefix) : void
static

addPrefix() - Add repository of helpers by prefix

Parameters
NameTypeDescription
$prefixstring
methodpublicgetExistingHelper(string $name) : \Zend_Controller_Action_Helper_Abstract
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 {@link hasHelper()} to check if the helper is registered prior to retrieving it.
Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
\Zend_Controller_Action_Helper_Abstract
Throws
ExceptionDescription
\Zend_Controller_Action_Exception
methodpublicgetExistingHelpers() : array
static

Return all registered helpers as helper => object pairs

Returns
TypeDescription
array
methodpublicgetHelper(string $name) : \Zend_Controller_Action_Helper_Abstract

getHelper() - get helper by name

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
\Zend_Controller_Action_Helper_Abstract
methodpublicgetPluginLoader() : \Zend_Loader_PluginLoader
static

Retrieve PluginLoader

Returns
TypeDescription
\Zend_Loader_PluginLoader
methodpublicgetStack() : \Zend_Controller_Action_HelperBroker_PriorityStack
static

Lazy load the priority stack and return it

methodpublicgetStaticHelper(string $name) : \Zend_Controller_Action_Helper_Abstract
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
NameTypeDescription
$namestring
Returns
TypeDescription
\Zend_Controller_Action_Helper_Abstract
methodpublichasHelper(string $name) : boolean
static

Is a particular helper loaded in the broker?

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
boolean
methodpublicnotifyPostDispatch() : void

notifyPostDispatch() - called by action controller dispatch method

methodpublicnotifyPreDispatch() : void

notifyPreDispatch() - called by action controller dispatch method

methodpublicremoveHelper(string $name) : boolean
static

Remove a particular helper from the broker

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
boolean
methodpublicresetHelpers() : void
static

resetHelpers()

methodpublicsetPluginLoader(\Zend_Loader_PluginLoader_Interface $loader) : void
static

Set PluginLoader for use with broker

Parameters
NameTypeDescription
$loader\Zend_Loader_PluginLoader_Interface
Documentation was generated by phpDocumentor 2.2.0 .