http://example.org/{myparam} http://example.org/{myparam:integer} http://example.org/{myparam:string} http://example.org/{myparam}/{myparam2}?test={myparam3}Mostra file Open project: 99designs/ergo
Method | Description | |
---|---|---|
__construct ( string $name, string $template ) | ||
getMatch ( $path, $metadata = null ) : |
||
getName ( ) | Returns the route name of the entry | |
getParameterNames ( ) : array | Returns the names of the replaceable parameters defined in this route | |
interpolate ( array $parameters ) : string |
Method | Description | |
---|---|---|
_getMatches ( string $path ) : array | Finds route pattern matches for the given path. |
Method | Description | |
---|---|---|
_escapeTemplate ( string $template ) : string | Escape for regex except for curly braces, which are pulled out later. | |
_extractParameterNames ( string $template ) : array | ||
_getParameterPattern ( string $template ) : array | Gets a pattern that can be used for parsing a template | |
_interpolateCallback ( $matches ) | A callback for preg_replace_callback() that returns interpolation parameters | |
_typePatternCallback ( $matches ) | A callback for preg_replace_callback() that returns pattern chunks for a type |
public __construct ( string $name, string $template ) | ||
$name | string | |
$template | string |
protected _getMatches ( string $path ) : array | ||
$path | string | |
return | array |
public getMatch ( $path, $metadata = null ) : |
||
return | or null if no match. |
public getParameterNames ( ) : array | ||
return | array |
public interpolate ( array $parameters ) : string | ||
$parameters | array | |
return | string |