Controller/Dispatcher/Abstract.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
Dispatcher  
Version
$Id$  

\Zend_Controller_Dispatcher_Abstract

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

Properties

>VPropertyprotectedstring $_defaultAction = 'index'
Default action
Default value'index'Details
Type
string
>VPropertyprotectedstring $_defaultController = 'index'
Default controller
Default value'index'Details
Type
string
>VPropertyprotectedstring $_defaultModule = 'default'
Default module
Default value'default'Details
Type
string
>VPropertyprotected\Zend_Controller_Front $_frontController
Front Controller instance
>VPropertyprotectedarray $_invokeParams = array()
Array of invocation parameters to use when instantiating action controllers
Default valuearray()Details
Type
array
>VPropertyprotectedstring $_pathDelimiter = '_'
Path delimiter character
Default value'_'Details
Type
string
>VPropertyprotected\Zend_Controller_Response_Abstract|null $_response = null
Response object to pass to action controllers, if any
Default valuenullDetails
Type
\Zend_Controller_Response_Abstract | null
>VPropertyprotectedarray $_wordDelimiter = array('-', '.')
Word delimiter characters
Default valuearray('-', '.')Details
Type
array

Methods

methodpublic__construct( $params = array()) : void

Constructor

Parameters
NameTypeDescription
$params
methodprotected_formatName(string $unformatted, boolean $isAction = false) : string

Formats a string from a URI into a PHP-friendly name.

By default, replaces words separated by the word separator character(s) with camelCaps. If $isAction is false, it also preserves replaces words separated by the path separation character with an underscore, making the following word Title cased. All non-alphanumeric characters are removed.
Parameters
NameTypeDescription
$unformattedstring
$isActionboolean

Defaults to false

Returns
TypeDescription
string
methodpublic_verifyDelimiter(string | array $spec) : array

Verify delimiter

Verify a delimiter to use in controllers or actions. May be a single string or an array of strings.
Parameters
NameTypeDescription
$specstring | array
Returns
TypeDescription
array
Throws
ExceptionDescription
\Zend_Controller_Dispatcher_Exceptionwith invalid delimiters
methodpublicclearParams( $name = null) : \Zend_Controller_Dispatcher_Abstract

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
NameTypeDescription
$name
Returns
TypeDescription
\Zend_Controller_Dispatcher_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 stored inside a Zend_Controller_Request_Abstract object, and reformat into a proper method name that would be found inside a class extending Zend_Controller_Action.

Parameters
NameTypeDescription
$unformattedstring
Returns
TypeDescription
string
methodpublicformatControllerName(string $unformatted) : string

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

Parameters
NameTypeDescription
$unformattedstring
Returns
TypeDescription
string
methodpublicgetDefaultAction() : string

Retrieve the default action name (minus formatting)

Returns
TypeDescription
string
methodpublicgetDefaultControllerName() : string

Retrieve the default controller name (minus formatting)

Returns
TypeDescription
string
methodpublicgetDefaultModule() : string

Retrieve the default module

Returns
TypeDescription
string
methodpublicgetFrontController() : \Zend_Controller_Front

Retrieve front controller instance

Returns
TypeDescription
\Zend_Controller_Front
methodpublicgetParam(string $name) : mixed

Retrieve a single parameter from the controller parameter stack

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
mixed
methodpublicgetParams() : array

Retrieve action controller instantiation parameters

Returns
TypeDescription
array
methodpublicgetPathDelimiter() : array

Retrieve the path delimiter character(s) used in controller names

Returns
TypeDescription
array
methodpublicgetResponse() : \Zend_Controller_Response_Abstract | null

Return the registered response object

Returns
TypeDescription
\Zend_Controller_Response_Abstract | null
methodpublicgetWordDelimiter() : array

Retrieve the word delimiter character(s) used in controller or action names

Returns
TypeDescription
array
methodpublicsetDefaultAction(string $action) : \Zend_Controller_Dispatcher_Abstract

Set the default action (minus any formatting)

Parameters
NameTypeDescription
$actionstring
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
methodpublicsetDefaultControllerName(string $controller) : \Zend_Controller_Dispatcher_Abstract

Set the default controller (minus any formatting)

Parameters
NameTypeDescription
$controllerstring
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
methodpublicsetDefaultModule(string $module) : \Zend_Controller_Dispatcher_Abstract

Set the default module

Parameters
NameTypeDescription
$modulestring
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
methodpublicsetFrontController(\Zend_Controller_Front $controller) : \Zend_Controller_Dispatcher_Abstract

Set front controller instance

Parameters
NameTypeDescription
$controller\Zend_Controller_Front
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
methodpublicsetParam(string $name, mixed $value) : \Zend_Controller_Dispatcher_Abstract

Add or modify a parameter to use when instantiating an action controller

Parameters
NameTypeDescription
$namestring
$valuemixed
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
methodpublicsetParams(array $params) : \Zend_Controller_Dispatcher_Abstract

Set parameters to pass to action controller constructors

Parameters
NameTypeDescription
$paramsarray
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
methodpublicsetPathDelimiter(string $spec) : \Zend_Controller_Dispatcher_Abstract

Set path delimiter

Set the path delimiter to use in controllers. May be a single string or an array of strings.
Parameters
NameTypeDescription
$specstring
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
methodpublicsetResponse(\Zend_Controller_Response_Abstract | null $response = null) : \Zend_Controller_Dispatcher_Abstract

Set response object to pass to action controllers

Parameters
NameTypeDescription
$response\Zend_Controller_Response_Abstract | null
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
methodpublicsetWordDelimiter(string | array $spec) : \Zend_Controller_Dispatcher_Abstract

Set word delimiter

Set the word delimiter to use in controllers and actions. May be a single string or an array of strings.
Parameters
NameTypeDescription
$specstring | array
Returns
TypeDescription
\Zend_Controller_Dispatcher_Abstract
Documentation was generated by phpDocumentor 2.2.0 .