Documentation

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]

IS_IN_HIERARCHY_KN

public string IS_IN_HIERARCHY_KN = 'inHierarchy'

PAGE_CONTROLLER_FQCN_KN

public string PAGE_CONTROLLER_FQCN_KN = 'fqcn'

PAGE_ENT_REPO_FQCN_KN

public string PAGE_ENT_REPO_FQCN_KN = 'repoFqcn'

Properties

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
RouteDef

parseFqcn()

private parseFqcn(string $toParse, T> $baseFqcn) : T>
Parameters
$toParse : string
$baseFqcn : T>
Tags
template
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
Return values
array<int, null|IPageConf>
On this page

Search results