class Route

Routes storage

Methods

static bool
hasPlaceholder(string $pattern)

Return true if route pattern have placeholder

static string
getLanguagePattern(string $path)

Get language route path

static string
getPagePattern(string $path = '')

Page route param pattern

static string
getRouteUrl(string $pattern, array $data = [], array $queryParams = [])

Get route url

static bool
isValidPattern(string $pattern)

Return true if route pattern is valid

static boolean
validate(string $method, string $pattern, array $routes)

Validate route

static RouteCollector
createRouteCollector()

Create route collector

Details

at line 28
static bool hasPlaceholder(string $pattern)

Return true if route pattern have placeholder

Parameters

string $pattern

Return Value

bool

at line 39
static string getLanguagePattern(string $path)

Get language route path

Parameters

string $path

Return Value

string

at line 50
static string getPagePattern(string $path = '')

Page route param pattern

Parameters

string $path

Return Value

string

at line 63
static string getRouteUrl(string $pattern, array $data = [], array $queryParams = [])

Get route url

Parameters

string $pattern
array $data
array $queryParams

Return Value

string

at line 109
static bool isValidPattern(string $pattern)

Return true if route pattern is valid

Parameters

string $pattern

Return Value

bool

at line 129
static boolean validate(string $method, string $pattern, array $routes)

Validate route

Parameters

string $method
string $pattern
array $routes

Return Value

boolean

at line 154
static RouteCollector createRouteCollector()

Create route collector

Return Value

RouteCollector