API Documentation

Controller/Dispatcher/Abstract.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Controller
subpackage
Dispatcher
version
$Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Controller_Dispatcher_Abstract

Description

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.

Zend_Controller_Dispatcher_Abstract

Implements
Zend_Controller_Dispatcher_Interface
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Controller
subpackage
Dispatcher
Properties
$_defaultAction
$_defaultController
$_defaultModule
$_frontController
$_invokeParams
$_pathDelimiter
$_response
$_wordDelimiter
Methods
__construct
formatControllerName
formatActionName
_verifyDelimiter
getWordDelimiter
setWordDelimiter
getPathDelimiter
setPathDelimiter
_formatName
getFrontController
setFrontController
setParam
setParams
getParam
getParams
clearParams
setResponse
getResponse
setDefaultControllerName
getDefaultControllerName
setDefaultAction
getDefaultAction
setDefaultModule
getDefaultModule

Description

Properties

$_defaultAction

string $_defaultAction = 'index'

Default action

Details

$_defaultAction
string
visibility
protected
default
index
final
false
static
false

$_defaultController

string $_defaultController = 'index'

Default controller

Details

$_defaultController
string
visibility
protected
default
index
final
false
static
false

$_defaultModule

string $_defaultModule = 'default'

Default module

Details

$_defaultModule
string
visibility
protected
default
default
final
false
static
false

$_frontController

Zend_Controller_Front $_frontController = ''

Front Controller instance

Details

$_frontController
Zend_Controller_Front
visibility
protected
default
final
false
static
false

$_invokeParams

array $_invokeParams = 'array'

Array of invocation parameters to use when instantiating action controllers

Details

$_invokeParams
array
visibility
protected
default
array
final
false
static
false

$_pathDelimiter

string $_pathDelimiter = '_'

Path delimiter character

Details

$_pathDelimiter
string
visibility
protected
default
_
final
false
static
false

$_response

Zend_Controller_Response_Abstract|null $_response = 'null'

Response object to pass to action controllers, if any

Details

$_response
Zend_Controller_Response_Abstract|null
visibility
protected
default
null
final
false
static
false

$_wordDelimiter

array $_wordDelimiter = 'array'

Word delimiter characters

Details

$_wordDelimiter
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct(  $params = array ) : void

Constructor

Arguments
$params
Details
visibility
public
final
false
static
false

_formatName

_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.

Arguments
$unformatted
string
$isAction
boolean
Defaults to false
Output
string
Details
visibility
protected
final
false
static
false

_verifyDelimiter

_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.

Arguments
$spec
stringarray
Output
array
Details
visibility
public
final
false
static
false
throws
with invalid delimiters

clearParams

clearParams( null|string|array $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.

Arguments
$name
nullstringarray
single key or array of keys for params to clear
Details
visibility
public
final
false
static
false

formatActionName

formatActionName( 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.

Arguments
$unformatted
string
Output
string
Details
visibility
public
final
false
static
false

formatControllerName

formatControllerName( 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.

Arguments
$unformatted
string
Output
string
Details
visibility
public
final
false
static
false

getDefaultAction

getDefaultAction( ) : string

Retrieve the default action name (minus formatting)

Output
string
Details
visibility
public
final
false
static
false

getDefaultControllerName

getDefaultControllerName( ) : string

Retrieve the default controller name (minus formatting)

Output
string
Details
visibility
public
final
false
static
false

getDefaultModule

getDefaultModule( ) : string

Retrieve the default module

Output
string
Details
visibility
public
final
false
static
false

getFrontController

getFrontController( ) : Zend_Controller_Front

Retrieve front controller instance

Details
visibility
public
final
false
static
false

getParam

getParam( string $name ) : mixed

Retrieve a single parameter from the controller parameter stack

Arguments
$name
string
Output
mixed
Details
visibility
public
final
false
static
false

getParams

getParams( ) : array

Retrieve action controller instantiation parameters

Output
array
Details
visibility
public
final
false
static
false

getPathDelimiter

getPathDelimiter( ) : array

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

Output
array
Details
visibility
public
final
false
static
false

getResponse

getResponse( ) : Zend_Controller_Response_Abstract|null

Return the registered response object

Details
visibility
public
final
false
static
false

getWordDelimiter

getWordDelimiter( ) : array

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

Output
array
Details
visibility
public
final
false
static
false

setDefaultAction

setDefaultAction( string $action ) : Zend_Controller_Dispatcher_Abstract

Set the default action (minus any formatting)

Arguments
$action
string
Details
visibility
public
final
false
static
false

setDefaultControllerName

setDefaultControllerName( string $controller ) : Zend_Controller_Dispatcher_Abstract

Set the default controller (minus any formatting)

Arguments
$controller
string
Details
visibility
public
final
false
static
false

setDefaultModule

setDefaultModule( string $module ) : Zend_Controller_Dispatcher_Abstract

Set the default module

Arguments
$module
string
Details
visibility
public
final
false
static
false

setFrontController

setFrontController( Zend_Controller_Front $controller ) : Zend_Controller_Dispatcher_Abstract

Set front controller instance

Arguments
$controller
Zend_Controller_Front
Details
visibility
public
final
false
static
false

setParam

setParam( string $name, mixed $value ) : Zend_Controller_Dispatcher_Abstract

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

Arguments
$name
string
$value
mixed
Details
visibility
public
final
false
static
false

setParams

setParams( array $params ) : Zend_Controller_Dispatcher_Abstract

Set parameters to pass to action controller constructors

Arguments
$params
array
Details
visibility
public
final
false
static
false

setPathDelimiter

setPathDelimiter( 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.

Arguments
$spec
string
Details
visibility
public
final
false
static
false

setResponse

setResponse( Zend_Controller_Response_Abstract|null $response = null ) : Zend_Controller_Dispatcher_Abstract

Set response object to pass to action controllers

Arguments
$response
Zend_Controller_Response_Abstractnull
Details
visibility
public
final
false
static
false

setWordDelimiter

setWordDelimiter( 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.

Arguments
$spec
stringarray
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.