PHP Class Roller\RouteCompiler

blog/:year/:month blog/item/:id blog/item/:id(.:format)
ファイルを表示 Open project: c9s/roller Class Usage Examples

Public Methods

Method Description
compile ( array $route ) : array Compiles the current route instance.
compilePattern ( string $pattern, array $options = [] ) compile pattern
splitTokens ( string $string ) : array Split tokens from path.

Method Details

compile() static public method

Compiles the current route instance.
static public compile ( array $route ) : array
$route array route info
return array compiled route info, with newly added 'compiled' key.

compilePattern() static public method

compile pattern
static public compilePattern ( string $pattern, array $options = [] )
$pattern string
$options array

splitTokens() static public method

Split tokens from path.
static public splitTokens ( string $string ) : array
$string string path string
return array matched results