PHP Class ManaPHP\Mvc\Router\Route

Inheritance: implements ManaPHP\Mvc\Router\RouteInterface
Afficher le fichier Open project: manaphp/manaphp

Protected Properties

Свойство Type Description
$_compiledPattern string
$_httpMethod string
$_paths array
$_pattern string

Méthodes publiques

Méthode Description
__construct ( string $pattern, string | array $paths = null, string $httpMethod = null ) \ManaPHP\Mvc\Router\Route constructor
getPaths ( ) : array Returns the paths
getRoutePaths ( string | array $paths = null ) : array Returns routePaths
match ( string $uri ) : boolean | array

Méthodes protégées

Méthode Description
_compilePattern ( string $pattern ) : string Replaces placeholders from pattern returning a valid PCRE regular expression
_extractNamedParams ( string $pattern ) : string Extracts parameters from a string

Method Details

__construct() public méthode

\ManaPHP\Mvc\Router\Route constructor
public __construct ( string $pattern, string | array $paths = null, string $httpMethod = null )
$pattern string
$paths string | array
$httpMethod string

_compilePattern() protected méthode

Replaces placeholders from pattern returning a valid PCRE regular expression
protected _compilePattern ( string $pattern ) : string
$pattern string
Résultat string

_extractNamedParams() protected méthode

Extracts parameters from a string
protected _extractNamedParams ( string $pattern ) : string
$pattern string
Résultat string

getPaths() public méthode

Returns the paths
public getPaths ( ) : array
Résultat array

getRoutePaths() public static méthode

Returns routePaths
public static getRoutePaths ( string | array $paths = null ) : array
$paths string | array
Résultat array

match() public méthode

public match ( string $uri ) : boolean | array
$uri string
Résultat boolean | array

Property Details

$_compiledPattern protected_oe property

protected string $_compiledPattern
Résultat string

$_httpMethod protected_oe property

protected string $_httpMethod
Résultat string

$_paths protected_oe property

protected array $_paths
Résultat array

$_pattern protected_oe property

protected string $_pattern
Résultat string