PluginShortRoute Class Info:
- Class Declaration:
class PluginShortRoute extends CakeRoute
- File name:
- Cake/Routing/Route/PluginShortRoute.php
- Description:
Plugin short route, that copies the plugin param to the controller parameters It is used for supporting /:plugin routes.
- Class Inheritance
- Package
- Cake.Routing.Route
Properties:
-
_compiledRoute string
The compiled route regular expression
-
defaults array
Default parameters for a Route
-
_greedy string
Is this route a greedy route? Greedy routes have a
/*in their template -
_headerMap array
HTTP header shortcut map. Used for evaluating header-based route expressions.
-
keys array
An array of named segments in a Route.
/:controller/:action/:idhas 3 key elements -
options array
An array of additional parameters for the Route.
-
template string
The routes template string.
compile
topCompiles the route's regular expression. Modifies defaults property so all necessary keys are set and populates $this->names with the named routing elements.
- Method defined in:
- Cake/Routing/Route/CakeRoute.php on line 111
- Return
array Returns a string regular expression of the compiled route.
compiled
topCheck if a Route has been compiled into a regular expression.
- Method defined in:
- Cake/Routing/Route/CakeRoute.php on line 101
- Return
boolean
__construct
topConstructor for a Route
- Parameters:
-
-
string $template required
Template string with parameter placeholders
-
array $defaults optional array ( )
Array of defaults for the route.
-
array $options optional array ( )
Array of additional options for the Route
-
- Method defined in:
- Cake/Routing/Route/CakeRoute.php on line 90
match
topReverse route plugin shortcut urls. If the plugin and controller are not the same the match is an auto fail.
- Parameters:
-
-
array $url required
Array of parameters to convert to a string.
-
- Method defined in:
- Cake/Routing/Route/PluginShortRoute.php on line 48
- Return
mixed either false or a string url.
_matchNamed
topReturn true if a given named $param's $val matches a given $rule depending on $context. Currently implemented rule types are controller, action and match that can be combined with each other.
- Parameters:
-
-
string $val required
The value of the named parameter
-
array $rule required
The rule(s) to apply, can also be a match string
-
string $context required
An array with additional context information (controller / action)
-
- Method defined in:
- Cake/Routing/Route/CakeRoute.php on line 334
- Return
boolean
parse
topParses a string url into an array. If a plugin key is found, it will be copied to the controller parameter
- Parameters:
-
-
string $url required
The url to parse
-
- Method defined in:
- Cake/Routing/Route/PluginShortRoute.php on line 32
- Return
mixed false on failure, or an array of request parameters
_parseArgs
topParse passed and Named parameters into a list of passed args, and a hash of named parameters. The local and global configuration for named parameters will be used.
- Parameters:
-
-
string $args required
A string with the passed & named params. eg. /1/page:2
-
string $context required
The current route context, which should contain controller/action keys.
-
- Method defined in:
- Cake/Routing/Route/CakeRoute.php on line 267
- Return
array Array of ($pass, $named)
persistParams
topApply persistent parameters to a url array. Persistent parameters are a special key used during route creation to force route parameters to persist when omitted from a url array.
- Parameters:
-
-
array $url required
The array to apply persistent parameters to.
-
array $params required
An array of persistent values to replace persistent ones.
-
- Method defined in:
- Cake/Routing/Route/CakeRoute.php on line 371
- Return
array An array with persistent parameters applied.
_writeRoute
topBuilds a route regular expression. Uses the template, defaults and options properties to compile a regular expression that can be used to parse request strings.
- Method defined in:
- Cake/Routing/Route/CakeRoute.php on line 125
- Return
void
_writeUrl
topConverts a matching route array into a url string. Composes the string url using the template used to create the route.
- Parameters:
-
-
array $params required
The params to convert to a string url.
-
- Method defined in:
- Cake/Routing/Route/CakeRoute.php on line 480
- Return
string Composed route string.
