interface RoutesStorageInterface

Routes storage interface

Methods

bool
addMiddleware(string $method, string $pattern, string $middlewareClass)

Add route middleware

array
getHomePageRoute()

Get home page route

array
searchRoutes(string $method, int|null $type = null)

Get routes list for request method

bool
saveRedirectUrl(string $method, string $pattern, string $url)

Save route redirect url

array
getRoutes(array $filter = [])

Get extension routes

bool
deleteRoutes(array $filter = [])

Delete routes

bool
setRoutesStatus(array $filter = [], int $status)

Set routes status

bool
addRoute(array $details)

Add route

bool
saveRouteOptions(string $method, string $pattern, array $options)

Save route options

bool
hasRoute(string $method, string $pattern)

Return true if reoute exists

bool
deleteRoute(string $method, string $pattern)

Delete route

array|false
getRoute(string $method, string $pattern)

Get route

array|null
getRouteDetails(string|int $id)

Get route details

Details

at line 25
bool addMiddleware(string $method, string $pattern, string $middlewareClass)

Add route middleware

Parameters

string $method
string $pattern
string $middlewareClass

Return Value

bool

at line 32
array getHomePageRoute()

Get home page route

Return Value

array

at line 41
array searchRoutes(string $method, int|null $type = null)

Get routes list for request method

Parameters

string $method
int|null $type

Return Value

array

at line 51
bool saveRedirectUrl(string $method, string $pattern, string $url)

Save route redirect url

Parameters

string $method
string $pattern
string $url

Return Value

bool

at line 59
array getRoutes(array $filter = [])

Get extension routes

Parameters

array $filter

Return Value

array

at line 67
bool deleteRoutes(array $filter = [])

Delete routes

Parameters

array $filter

Return Value

bool

at line 76
bool setRoutesStatus(array $filter = [], int $status)

Set routes status

Parameters

array $filter
int $status

Return Value

bool

at line 84
bool addRoute(array $details)

Add route

Parameters

array $details

Return Value

bool

at line 94
bool saveRouteOptions(string $method, string $pattern, array $options)

Save route options

Parameters

string $method
string $pattern
array $options

Return Value

bool

at line 103
bool hasRoute(string $method, string $pattern)

Return true if reoute exists

Parameters

string $method
string $pattern

Return Value

bool

at line 112
bool deleteRoute(string $method, string $pattern)

Delete route

Parameters

string $method
string $pattern

Return Value

bool

at line 121
array|false getRoute(string $method, string $pattern)

Get route

Parameters

string $method
string $pattern

Return Value

array|false

at line 129
array|null getRouteDetails(string|int $id)

Get route details

Parameters

string|int $id Route id or uuid

Return Value

array|null