API Documentation

Controller/Router/Route/Regex.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
Router
version
$Id: Regex.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Controller_Router_Route_Regex

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_Router_Route_Regex

Extends from
Zend_Controller_Router_Route_Abstract
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
Router
Properties
$_regex
$_defaults
$_reverse
$_map
$_values
Methods
getInstance
__construct
getVersion
match
_getMappedValues
assemble
getDefault
getDefaults
getVariables
_arrayMergeNumericKeys

Description

Regex Route

Properties

$_defaults

 $_defaults = 'array'

Details

visibility
protected
default
array
final
false
static
false

$_map

 $_map = 'array'

Details

visibility
protected
default
array
final
false
static
false

$_regex

 $_regex = 'null'

Details

visibility
protected
default
null
final
false
static
false

$_reverse

 $_reverse = 'null'

Details

visibility
protected
default
null
final
false
static
false

$_values

 $_values = 'array'

Details

visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct(  $route,  $defaults = array,  $map = array,  $reverse = null ) :
Arguments
$route
$defaults
$map
$reverse
Details
visibility
public
final
false
static
false

_arrayMergeNumericKeys

_arrayMergeNumericKeys( array $array1, array $array2 ) : array

_arrayMergeNumericKeys() - allows for a strict key (numeric's included) array_merge.

php's array_merge() lacks the ability to merge with numeric keys.

Arguments
$array1
array
$array2
array
Output
array
Details
visibility
protected
final
false
static
false

_getMappedValues

_getMappedValues( array $values, boolean $reversed = false, boolean $preserve = false ) : array

Maps numerically indexed array values to it's associative mapped counterpart.

Or vice versa. Uses user provided map array which consists of index => name parameter mapping. If map is not found, it returns original array.

Method strips destination type of keys form source array. Ie. if source array is indexed numerically then every associative key will be stripped. Vice versa if reversed is set to true.

Arguments
$values
array
Indexed or associative array of values to map
$reversed
boolean
False means translation of index to association. True means reverse.
$preserve
boolean
Should wrong type of keys be preserved or stripped.
Output
array
An array of mapped values
Details
visibility
protected
final
false
static
false

assemble

assemble( array $data = array,  $reset = false,  $encode = false,  $partial = false ) : string

Assembles a URL path defined by this route

Arguments
$data
array
An array of name (or index) and value pairs used as parameters
$reset
$encode
$partial
Output
string
Route path with user submitted parameters
Details
visibility
public
final
false
static
false

getDefault

getDefault( string $name ) : string

Return a single parameter of route's defaults

Arguments
$name
string
Array key of the parameter
Output
string
Previously set default
Details
visibility
public
final
false
static
false

getDefaults

getDefaults( ) : array

Return an array of defaults

Output
array
Route defaults
Details
visibility
public
final
false
static
false

getInstance

getInstance( Zend_Config $config ) :

Instantiates route based on passed Zend_Config structure

Arguments
$config
Zend_Config
Configuration object
Details
visibility
public
final
false
static
true

getVariables

getVariables( ) : array

Get all variables which are used by the route

Output
array
Details
visibility
public
final
false
static
false

getVersion

getVersion( ) :
Details
visibility
public
final
false
static
false

match

match( string $path,  $partial = false ) : array|false

Matches a user submitted path with a previously defined route.

Assigns and returns an array of defaults on a successful match.

Arguments
$path
string
Path used to match against this routing map
$partial
Output
array|false
An array of assigned values or a false on a mismatch
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.