RouteType
in package
Route types
Table of Contents
Constants
- ADMIN_API_URL = 5
- ADMIN_PAGE_URL = 2
- API_URL = 4
- HOME_PAGE_URL = 1
- INSTALL_PAGE = 6
- INSTALL_PAGE_URL_PATH = 'admin/install'
- SYSTEM_API_URL = 3
- UNKNOW_TYPE = 0
Methods
- getInstallPageUrl() : string
- Get install page url
- getType() : int
- Get route type
- isApiInstallRequest() : bool
- Return true if request is for installation
- isInstallPage() : bool
- Check for install page url
- isLanguageSegment() : bool
- Return true if last url segment is language
- isSystemApiUrl() : bool
- Return true if request url is system api
- isValidApiRoutePattern() : bool
- Return true if api url pattern is valid
Constants
ADMIN_API_URL
public
mixed
ADMIN_API_URL
= 5
ADMIN_PAGE_URL
public
mixed
ADMIN_PAGE_URL
= 2
API_URL
public
mixed
API_URL
= 4
HOME_PAGE_URL
public
mixed
HOME_PAGE_URL
= 1
INSTALL_PAGE
public
mixed
INSTALL_PAGE
= 6
INSTALL_PAGE_URL_PATH
public
mixed
INSTALL_PAGE_URL_PATH
= 'admin/install'
SYSTEM_API_URL
public
mixed
SYSTEM_API_URL
= 3
UNKNOW_TYPE
public
mixed
UNKNOW_TYPE
= 0
Methods
getInstallPageUrl()
Get install page url
public
static getInstallPageUrl() : string
Return values
stringgetType()
Get route type
public
static getType(string $url[, array<string|int, mixed> $options = [] ]) : int
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Return values
intisApiInstallRequest()
Return true if request is for installation
public
static isApiInstallRequest([string|null $uri = null ]) : bool
Parameters
- $uri : string|null = null
Return values
boolisInstallPage()
Check for install page url
public
static isInstallPage([string|null $uri = null ]) : bool
Parameters
- $uri : string|null = null
Return values
boolisLanguageSegment()
Return true if last url segment is language
public
static isLanguageSegment(array<string|int, mixed> $urlSegments) : bool
Parameters
- $urlSegments : array<string|int, mixed>
Return values
boolisSystemApiUrl()
Return true if request url is system api
public
static isSystemApiUrl(string $url) : bool
Parameters
- $url : string
Return values
boolisValidApiRoutePattern()
Return true if api url pattern is valid
public
static isValidApiRoutePattern(string $pattern) : bool
Parameters
- $pattern : string