API Documentation

Controller/Dispatcher/Interface.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
Dispatcher  
version
$Id: Interface.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Controller_Dispatcher_Interface

copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Controller  
subpackage
Dispatcher  

Methods

methodpublicaddControllerDirectory( string $path, string $args = null ) : \Zend_Controller_Dispatcher_Interface

Add a controller directory to the controller directory stack

Parameters
Name Type Description
$path string
$args string
Returns
Type Description
\Zend_Controller_Dispatcher_Interface
methodpublicclearParams( null|string|array $name = null ) : \Zend_Controller_Dispatcher_Interface

Clear the controller parameter stack

By default, clears all parameters. If a parameter name is given, clears only that parameter; if an array of parameter names is provided, clears each.

Parameters
Name Type Description
$name null|string|array single key or array of keys for params to clear
Returns
Type Description
\Zend_Controller_Dispatcher_Interface
methodpublicdispatch( \Zend_Controller_Request_Abstract $request, \Zend_Controller_Response_Abstract $response ) : void

Dispatches a request object to a controller/action. If the action requests a forward to another action, a new request will be returned.

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
$response \Zend_Controller_Response_Abstract
methodpublicformatActionName( string $unformatted ) : string

Formats a string into an action name. This is used to take a raw action name, such as one that would be packaged inside a request object, and reformat into a proper method name that would be found inside a class extending Zend_Controller_Action.

Parameters
Name Type Description
$unformatted string
Returns
Type Description
string
methodpublicformatControllerName( string $unformatted ) : string

Formats a string into a controller name. This is used to take a raw controller name, such as one that would be packaged inside a request object, and reformat it to a proper class name that a class extending Zend_Controller_Action would use.

Parameters
Name Type Description
$unformatted string
Returns
Type Description
string
methodpublicformatModuleName( string $unformatted ) : string

Formats a string into a module name. This is used to take a raw module name, such as one that would be packaged inside a request object, and reformat it to a proper directory/class name that a class extending Zend_Controller_Action would use.

Parameters
Name Type Description
$unformatted string
Returns
Type Description
string
methodpublicgetControllerDirectory( ) : array

Return the currently set directory(ies) for controller file lookup

Returns
Type Description
array
methodpublicgetDefaultAction( ) : string

Retrieve the default action

Returns
Type Description
string
methodpublicgetDefaultControllerName( ) : string

Retrieve the default controller name

Returns
Type Description
string
methodpublicgetDefaultModule( ) : string

Retrieve the default module name

Returns
Type Description
string
methodpublicgetParam( string $name ) : mixed

Retrieve a single parameter from the controller parameter stack

Parameters
Name Type Description
$name string
Returns
Type Description
mixed
methodpublicgetParams( ) : array

Retrieve the parameters to pass to the Action Controller constructor

Returns
Type Description
array
methodpublicgetResponse( ) : \Zend_Controller_Response_Abstract|null

Retrieve the response object, if any

Returns
Type Description
\Zend_Controller_Response_Abstractnull
methodpublicisDispatchable( \Zend_Controller_Request_Abstract $request ) : boolean

Returns TRUE if an action can be dispatched, or FALSE otherwise.

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
Returns
Type Description
boolean
methodpublicisValidModule( string $module ) : boolean

Whether or not a given module is valid

Parameters
Name Type Description
$module string
Returns
Type Description
boolean
methodpublicsetControllerDirectory(  $path ) : \Zend_Controller_Dispatcher_Interface

Set the directory where controller files are stored

Specify a string or an array; if an array is specified, all paths will be added.

Parameters
Name Type Description
$path
Returns
Type Description
\Zend_Controller_Dispatcher_Interface
methodpublicsetParam( string $name, mixed $value ) : \Zend_Controller_Dispatcher_Interface

Add or modify a parameter with which to instantiate an Action Controller

Parameters
Name Type Description
$name string
$value mixed
Returns
Type Description
\Zend_Controller_Dispatcher_Interface
methodpublicsetParams( array $params ) : \Zend_Controller_Dispatcher_Interface

Set an array of a parameters to pass to the Action Controller constructor

Parameters
Name Type Description
$params array
Returns
Type Description
\Zend_Controller_Dispatcher_Interface
methodpublicsetResponse( \Zend_Controller_Response_Abstract|null $response = null ) : void

Set the response object to use, if any

Parameters
Name Type Description
$response \Zend_Controller_Response_Abstract|null
Documentation was generated by DocBlox 0.13.3.