RouteDefParser
in package
Read onlyYes
FinalYes
Table of Contents
Constants
- ALL_KNS : array<string|int, mixed> = [self::FQCN_KN, self::IS_IN_HIERARCHY_KN, self:...
- DFT_IS_IN_HIERARCHY : bool = true
- DFT_IS_INDEXED : bool = true
- FQCN_KN : string = 'fqcn'
- IS_IN_HIERARCHY_KN : string = 'inHierarchy'
- IS_INDEXED_KN : string = 'indexed'
- PAGE_CONTROLLER_FQCN_KN : string = 'fqcn'
- PAGE_ENT_REPO_FQCN_KN : string = 'repoFqcn'
- PAGE_KN : string = 'page'
- PAGE_TITLE_KN : string = 'title'
- PAGE_TYPE_ENT_VAL : string = 'ent'
- PAGE_TYPE_KN : string = 'type'
- PARAMS_KN : string = 'params'
- ROLES_KN : string = 'roles'
- ROUTES_KN : string = 'routes'
Properties
- $baseUrl : string
Methods
- __construct() : mixed
- parse() : RouteDef
- parseFqcn() : T>
- parsePageConf() : array<int, null|IPageConf>
Constants
ALL_KNS
public
array<string|int, mixed>
ALL_KNS
= [self::FQCN_KN, self::IS_IN_HIERARCHY_KN, self::IS_INDEXED_KN, self::PAGE_CONTROLLER_FQCN_KN, self::PAGE_ENT_REPO_FQCN_KN, self::PAGE_KN, self::PAGE_TITLE_KN, self::PAGE_TYPE_ENT_VAL, self::PAGE_TYPE_KN, self::PARAMS_KN, self::ROLES_KN, self::ROUTES_KN]
DFT_IS_IN_HIERARCHY
public
bool
DFT_IS_IN_HIERARCHY
= true
DFT_IS_INDEXED
public
bool
DFT_IS_INDEXED
= true
FQCN_KN
public
string
FQCN_KN
= 'fqcn'
IS_IN_HIERARCHY_KN
public
string
IS_IN_HIERARCHY_KN
= 'inHierarchy'
IS_INDEXED_KN
public
string
IS_INDEXED_KN
= 'indexed'
PAGE_CONTROLLER_FQCN_KN
public
string
PAGE_CONTROLLER_FQCN_KN
= 'fqcn'
PAGE_ENT_REPO_FQCN_KN
public
string
PAGE_ENT_REPO_FQCN_KN
= 'repoFqcn'
PAGE_KN
public
string
PAGE_KN
= 'page'
PAGE_TITLE_KN
public
string
PAGE_TITLE_KN
= 'title'
PAGE_TYPE_ENT_VAL
public
string
PAGE_TYPE_ENT_VAL
= 'ent'
PAGE_TYPE_KN
public
string
PAGE_TYPE_KN
= 'type'
PARAMS_KN
public
string
PARAMS_KN
= 'params'
ROLES_KN
public
string
ROLES_KN
= 'roles'
ROUTES_KN
public
string
ROUTES_KN
= 'routes'
Properties
$baseUrl
private
string
$baseUrl
Methods
__construct()
public
__construct(string $baseUrl) : mixed
Parameters
- $baseUrl : string
-
The URL to the app's home, without trailing slash.
parse()
public
parse(AppObject<string|int, mixed> $route[, null|array<int, string> $parentRoles = null ][, bool $allowOverridingParentRoles = false ][, bool $isIndexed = self::DFT_IS_INDEXED ][, bool $isInHierarchy = self::DFT_IS_IN_HIERARCHY ]) : RouteDef
Parameters
- $route : AppObject<string|int, mixed>
-
The JSON-decoded route as an associative array.
- $parentRoles : null|array<int, string> = null
-
The parent roles if defined, null if the current route is the root route.
- $allowOverridingParentRoles : bool = false
-
If true, a sub-route can add role its parent does not have.
- $isIndexed : bool = self::DFT_IS_INDEXED
- $isInHierarchy : bool = self::DFT_IS_IN_HIERARCHY
Return values
RouteDefparseFqcn()
private
parseFqcn(string $toParse, T> $baseFqcn) : T>
Parameters
- $toParse : string
- $baseFqcn : T>
Tags
Return values
T>parsePageConf()
private
parsePageConf(AppObject<string|int, mixed> $routeDefData, bool $isIndexed, bool $isInHierarchy) : array<int, null|IPageConf>
Parameters
- $routeDefData : AppObject<string|int, mixed>
- $isIndexed : bool
- $isInHierarchy : bool