RouteDefinition
in package
FinalYes
Serializable description of one dynamic front route.
Carries what the router needs to build the route through its factory, so no Doctrine entity
ever reaches the router (see RouteTableBuilder). It is passed to the factory as
$routeEntity and is the source of allowedPageIds for the whitelist
(BaseRouteFactory).
factoryClass is already a normalized class name (never null, DefaultRouteFactory is
resolved at build time) and module has no Front: prefix.
Table of Contents
Properties
- $action : string
- $allowedPageIds : array<string|int, mixed>
- $factoryClass : string
- $id : int
- $mask : string
- $module : string
- $presenter : string
Methods
- __construct() : mixed
- fromArray() : self
- getId() : int
-
toArray()
: array{id: int, mask: string, module: string, presenter: string, action: string, factory: string, pageIds: list
} - asInt() : int
- Casts a decoded value to int; a non-scalar gives 0.
- asString() : string
- Casts a decoded value to string; a non-scalar gives an empty string.
Properties
$action read-only
public
string
$action
$allowedPageIds read-only
public
array<string|int, mixed>
$allowedPageIds
$factoryClass read-only
public
string
$factoryClass
$id read-only
public
int
$id
$mask read-only
public
string
$mask
$module read-only
public
string
$module
$presenter read-only
public
string
$presenter
Methods
__construct()
public
__construct(int $id, string $mask, string $module, string $presenter, string $action, string $factoryClass, array<int, int> $allowedPageIds) : mixed
Parameters
- $id : int
- $mask : string
- $module : string
- $presenter : string
- $action : string
- $factoryClass : string
- $allowedPageIds : array<int, int>
-
whitelisted page ids (M2M
page_route_rel); empty means no restriction
fromArray()
public
static fromArray(array<string, mixed> $data) : self
Parameters
- $data : array<string, mixed>
Tags
Return values
selfgetId()
public
getId() : int
Return values
inttoArray()
public
toArray() : array{id: int, mask: string, module: string, presenter: string, action: string, factory: string, pageIds: list}
Return values
array{id: int, mask: string, module: string, presenter: string, action: string, factory: string, pageIds: listasInt()
Casts a decoded value to int; a non-scalar gives 0.
private
static asInt(mixed $value) : int
Parameters
- $value : mixed
Return values
intasString()
Casts a decoded value to string; a non-scalar gives an empty string.
private
static asString(mixed $value) : string
Parameters
- $value : mixed