프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$defaults | array | Default parameters for a Route | |
$keys | array | /:controller/:action/:id has 3 key elements | |
$options | array | An array of additional parameters for the Route. | |
$template | string | The routes template string. |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_compiledRoute | string | The compiled route regular expression | |
$_extensions | array | List of connected extensions for this route. | |
$_greedy | string | Is this route a greedy route? Greedy routes have a /* in their template | |
$_name | string | The name for a route. Fetch with Route::getName(); |
메소드 | 설명 | |
---|---|---|
__construct ( string $template, array | string $defaults = [], array $options = [] ) | Constructor for a Route | |
__set_state ( array $fields ) : |
Set state magic method to support var_export | |
compile ( ) : array | Compiles the route's regular expression. | |
compiled ( ) : boolean | Check if a Route has been compiled into a regular expression. | |
extensions ( null | string | array $extensions = null ) : array | null | Get/Set the supported extensions for this route. | |
getExtensions ( ) : array | Get the supported extensions for this route. | |
getName ( ) : string | Get the standardized plugin.controller:action name for a route. | |
match ( array $url, array $context = [] ) : string | false | Check if a URL array matches this route instance. | |
parse ( string $url, string $method = '' ) : array | false | Checks to see if the given URL can be parsed by this route. | |
setExtensions ( array $extensions ) | Set the supported extensions for this route. | |
staticPath ( ) : string | Get the static path portion for this route. |
메소드 | 설명 | |
---|---|---|
_matchMethod ( array $url ) : boolean | Check whether or not the URL's HTTP method matches. | |
_parseArgs ( string $args, string $context ) : array | Parse passed parameters into a list of passed args. | |
_parseExtension ( string $url ) : array | Removes the extension from $url if it contains a registered extension. | |
_persistParams ( array $url, array $params ) : array | Apply 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. | |
_writeRoute ( ) : void | Builds a route regular expression. | |
_writeUrl ( array $params, array $pass = [], array $query = [] ) : string | Converts a matching route array into a URL string. |
public static __set_state ( array $fields ) : |
||
$fields | array | Key/Value of object attributes |
리턴 | A new instance of the route |
protected _matchMethod ( array $url ) : boolean | ||
$url | array | The array for the URL being generated. |
리턴 | boolean |
protected _parseExtension ( string $url ) : array | ||
$url | string | The url to parse. |
리턴 | array | containing url, extension |
protected _writeRoute ( ) : void | ||
리턴 | void |
public getExtensions ( ) : array | ||
리턴 | array |
public match ( array $url, array $context = [] ) : string | false | ||
$url | array | An array of parameters to check matching with. |
$context | array | An array of the current request context. Contains information such as the current host, scheme, port, base directory and other url params. |
리턴 | string | false | Either a string URL for the parameters if they match or false. |
public setExtensions ( array $extensions ) | ||
$extensions | array | The extensions to set. |
public staticPath ( ) : string | ||
리턴 | string |
protected string $_compiledRoute | ||
리턴 | string |
protected array $_extensions | ||
리턴 | array |
protected string $_greedy | ||
리턴 | string |
protected string $_name | ||
리턴 | string |