Manager
extends AbstractManager
in package
Middleware manager class
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor
- __get() : mixed
- Get an item
- __isset() : bool
- Determine if an item exists
- __set() : void
- Set an item
- __unset() : void
- Unset an item
- addHandler() : static
- Add a handler
- addHandlers() : static
- Add handlers
- addItem() : static
- Add an item
- addItems() : static
- Add items
- count() : int
- Return count
- getHandler() : mixed
- Get a handler
- getHandlers() : array<string|int, mixed>
- Get handlers
- getItem() : mixed
- Get an item
- getItems() : array<string|int, mixed>
- Get items
- getIterator() : ArrayIterator
- Get iterator
- handle() : mixed
- Recursive method to execute all middleware handlers
- hasHandler() : bool
- Determine whether the manager has a handler
- hasHandlers() : bool
- Determine whether the manager has handlers
- hasItem() : bool
- Determine whether the manager has an item
- hasItems() : bool
- Determine whether the manager has items
- offsetExists() : bool
- Determine if an item exists
- offsetGet() : mixed
- Get an item
- offsetSet() : void
- Set an item
- offsetUnset() : void
- Unset an item
- process() : static
- Process all middleware
- removeHandler() : static
- Remove a handler
- removeItem() : static
- Remove an item
- setItems() : static
- Set items
- terminate() : void
- Execute all middleware handlers terminate methods
Properties
$handlers
Handlers
protected
static array<string|int, mixed>
$handlers
= []
$items
Manager items
protected
array<string|int, mixed>
$items
= []
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed>|null $handlers = null ]) : mixed
Instantiate the middleware manager object.
Parameters
- $handlers : array<string|int, mixed>|null = null
__get()
Get an item
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
Determine if an item exists
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
Set an item
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
__unset()
Unset an item
public
__unset(string $name) : void
Parameters
- $name : string
addHandler()
Add a handler
public
addHandler(mixed $handler[, mixed $name = null ]) : static
Parameters
- $handler : mixed
- $name : mixed = null
Return values
staticaddHandlers()
Add handlers
public
addHandlers(array<string|int, mixed> $handlers) : static
Parameters
- $handlers : array<string|int, mixed>
Return values
staticaddItem()
Add an item
public
addItem(mixed $item[, mixed $name = null ]) : static
Parameters
- $item : mixed
- $name : mixed = null
Return values
staticaddItems()
Add items
public
addItems(array<string|int, mixed> $items) : static
Parameters
- $items : array<string|int, mixed>
Return values
staticcount()
Return count
public
count() : int
Return values
intgetHandler()
Get a handler
public
getHandler(mixed $name) : mixed
Parameters
- $name : mixed
getHandlers()
Get handlers
public
getHandlers() : array<string|int, mixed>
Return values
array<string|int, mixed>getItem()
Get an item
public
getItem(mixed $name) : mixed
Parameters
- $name : mixed
getItems()
Get items
public
getItems() : array<string|int, mixed>
Return values
array<string|int, mixed>getIterator()
Get iterator
public
getIterator() : ArrayIterator
Return values
ArrayIteratorhandle()
Recursive method to execute all middleware handlers
public
static handle(mixed $request, Closure $dispatch[, mixed $dispatchParams = null ]) : mixed
Parameters
- $request : mixed
- $dispatch : Closure
- $dispatchParams : mixed = null
hasHandler()
Determine whether the manager has a handler
public
hasHandler(string $name) : bool
Parameters
- $name : string
Return values
boolhasHandlers()
Determine whether the manager has handlers
public
hasHandlers() : bool
Return values
boolhasItem()
Determine whether the manager has an item
public
hasItem(string $name) : bool
Parameters
- $name : string
Return values
boolhasItems()
Determine whether the manager has items
public
hasItems() : bool
Return values
booloffsetExists()
Determine if an item exists
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
Return values
booloffsetGet()
Get an item
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
Set an item
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
Unset an item
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
process()
Process all middleware
public
process(mixed $request, Closure $dispatch[, mixed $dispatchParams = null ]) : static
Parameters
- $request : mixed
- $dispatch : Closure
- $dispatchParams : mixed = null
Return values
staticremoveHandler()
Remove a handler
public
removeHandler(mixed $name) : static
Parameters
- $name : mixed
Return values
staticremoveItem()
Remove an item
public
removeItem(mixed $name) : static
Parameters
- $name : mixed
Return values
staticsetItems()
Set items
public
setItems(array<string|int, mixed> $items) : static
Parameters
- $items : array<string|int, mixed>
Return values
staticterminate()
Execute all middleware handlers terminate methods
public
static terminate(array<string|int, mixed> $handlers[, mixed $request = null ][, mixed $response = null ]) : void
Parameters
- $handlers : array<string|int, mixed>
- $request : mixed = null
- $response : mixed = null