MemoryDecorator
class MemoryDecorator implements RouteRepository
Class MemoryDecorator
Properties
protected RouteRepository | $repo | Repository instance | |
protected array | $mapBySiteKey | Map consist of route item by site key | |
protected array | $mapByInstanceId | Map consist of route item by instance identifier | |
protected array | $mapByModule | Map consist of route item by module name |
Methods
Returns all route items
Retrieve a route by url segment and site key
Retrieve a route by instance identifier
Retrieve routes by site key
Retrieve routes by module name
Save a new route item and return the instance
Details
at line 65
__construct(RouteRepository $repo)
MemoryDecorator constructor.
at line 75
InstanceRoute[]
all()
Returns all route items
at line 93
InstanceRoute
findByUrlAndSiteKey(string $url, string $siteKey)
Retrieve a route by url segment and site key
at line 112
InstanceRoute
findByInstanceId(string $instanceId)
Retrieve a route by instance identifier
at line 131
InstanceRoute[]
fetchBySiteKey(string $siteKey)
Retrieve routes by site key
at line 150
InstanceRoute[]
fetchByModule(string $module)
Retrieve routes by module name
at line 169
InstanceRoute
create(array $input)
Save a new route item and return the instance
at line 183
InstanceRoute
put(InstanceRoute $route)
Save the route item
at line 197
bool|null
delete(InstanceRoute $route)
Delete the route item from the repository
at line 210
protected void
setToMap(InstanceRoute $route)
Set a route item to map
at line 223
protected void
setToSiteKeyMap(InstanceRoute $route)
Set a route item to site key map
at line 238
protected void
setToModuleMap(InstanceRoute $route)
Set a route item to module map
at line 253
protected void
setToInstanceIdMap(InstanceRoute $route)
Set a route item to instance map
at line 264
protected void
unsetFromMap(InstanceRoute $route)
Unset a route item from map
at line 277
protected void
unsetFromSiteKeyMap(InstanceRoute $route)
Unset a route item from site key map
at line 290
protected void
unsetFromModuleMap(InstanceRoute $route)
Unset a route item from module map
at line 303
protected void
unsetFromInstanceIdMap(InstanceRoute $route)
Unset a route item from instance map