API Documentation

Controller/Plugin/Broker.php

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Controller  
subpackage
Plugins  
version
$Id: Broker.php 24241 2011-07-14 08:09:41Z bate $  

\Zend_Controller_Plugin_Broker

Extends from
\Zend_Controller_Plugin_Abstract
category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Controller  
subpackage
Plugins  

Properties

Propertyprotectedarray  $_plugins= 'array'

Array of instance of objects extending Zend_Controller_Plugin_Abstract

Default valuearrayDetails
Type
array

Methods

methodpublicdispatchLoopShutdown( ) : void

Called before Zend_Controller_Front exits its dispatch loop.

methodpublicdispatchLoopStartup( \Zend_Controller_Request_Abstract $request ) : void

Called before Zend_Controller_Front enters its dispatch loop.

During the dispatch loop, Zend_Controller_Front keeps a Zend_Controller_Request_Abstract object, and uses Zend_Controller_Dispatcher to dispatch the Zend_Controller_Request_Abstract object to controllers/actions.

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
methodpublicgetPlugin( string $class ) : false|\Zend_Controller_Plugin_Abstract|array

Retrieve a plugin or plugins by class

Parameters
Name Type Description
$class string

Class name of plugin(s) desired

Returns
Type Description
false\Zend_Controller_Plugin_Abstractarray Returns false if none found, plugin if only one found, and array of plugins if multiple plugins of same class found
methodpublicgetPlugins( ) : array

Retrieve all plugins

Returns
Type Description
array
methodpublicgetRequest( ) : \Zend_Controller_Request_Abstract

Get request object

Returns
Type Description
\Zend_Controller_Request_Abstract $request
methodpublicgetResponse( ) : \Zend_Controller_Response_Abstract

Get response object

Returns
Type Description
\Zend_Controller_Response_Abstract $response
methodpublichasPlugin( string $class ) : bool

Is a plugin of a particular class registered?

Parameters
Name Type Description
$class string
Returns
Type Description
bool
methodpublicpostDispatch( \Zend_Controller_Request_Abstract $request ) : void

Called after an action is dispatched by Zend_Controller_Dispatcher.

This callback allows for proxy or filter behavior. By altering the request and resetting its dispatched flag (via {@link Zend_Controller_Request_Abstract::setDispatched() setDispatched(false)}), a new action may be specified for dispatching.

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
methodpublicpreDispatch( \Zend_Controller_Request_Abstract $request ) : void

Called before an action is dispatched by Zend_Controller_Dispatcher.

This callback allows for proxy or filter behavior. By altering the request and resetting its dispatched flag (via {@link Zend_Controller_Request_Abstract::setDispatched() setDispatched(false)}), the current action may be skipped.

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
methodpublicregisterPlugin( \Zend_Controller_Plugin_Abstract $plugin, int $stackIndex = null ) : \Zend_Controller_Plugin_Broker

Register a plugin.

Parameters
Name Type Description
$plugin \Zend_Controller_Plugin_Abstract
$stackIndex int
Returns
Type Description
\Zend_Controller_Plugin_Broker
methodpublicrouteShutdown( \Zend_Controller_Request_Abstract $request ) : void

Called before Zend_Controller_Front exits its iterations over the route set.

Called after Zend_Controller_Front exits from the router.

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
methodpublicrouteStartup( \Zend_Controller_Request_Abstract $request ) : void

Called before Zend_Controller_Front begins evaluating the request against its routes.

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
methodpublicsetRequest( \Zend_Controller_Request_Abstract $request ) : \Zend_Controller_Plugin_Broker

Set request object, and register with each plugin

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
Returns
Type Description
\Zend_Controller_Plugin_Broker
methodpublicsetResponse( \Zend_Controller_Response_Abstract $response ) : \Zend_Controller_Plugin_Broker

Set response object

Parameters
Name Type Description
$response \Zend_Controller_Response_Abstract
Returns
Type Description
\Zend_Controller_Plugin_Broker
methodpublicunregisterPlugin( string|\Zend_Controller_Plugin_Abstract $plugin ) : \Zend_Controller_Plugin_Broker

Unregister a plugin.

Parameters
Name Type Description
$plugin string|\Zend_Controller_Plugin_Abstract Plugin object or class name
Returns
Type Description
\Zend_Controller_Plugin_Broker
Documentation was generated by DocBlox 0.13.3.