RequestStack
in package
Request stack that controls the lifecycle of requests.
Tags
Table of Contents
- $requests : array<string|int, Request>
- getCurrentRequest() : Request|null
- getMainRequest() : Request|null
- Gets the main request.
- getMasterRequest() : Request|null
- Gets the master request.
- getParentRequest() : Request|null
- Returns the parent request of the current.
- getSession() : SessionInterface
- Gets the current session.
- pop() : Request|null
- Pops the current request from the stack.
- push() : mixed
- Pushes a Request on the stack.
Properties
$requests
private
array<string|int, Request>
$requests
= []
Methods
getCurrentRequest()
public
getCurrentRequest() : Request|null
Return values
Request|null —getMainRequest()
Gets the main request.
public
getMainRequest() : Request|null
Be warned that making your code aware of the main request might make it un-compatible with other features of your framework like ESI support.
Return values
Request|null —getMasterRequest()
Gets the master request.
public
getMasterRequest() : Request|null
Tags
Return values
Request|null —getParentRequest()
Returns the parent request of the current.
public
getParentRequest() : Request|null
Be warned that making your code aware of the parent request might make it un-compatible with other features of your framework like ESI support.
If current Request is the main request, it returns null.
Return values
Request|null —getSession()
Gets the current session.
public
getSession() : SessionInterface
Tags
Return values
SessionInterface —pop()
Pops the current request from the stack.
public
pop() : Request|null
This operation lets the current request go out of scope.
This method should generally not be called directly as the stack management should be taken care of by the application itself.
Return values
Request|null —push()
Pushes a Request on the stack.
public
push(Request $request) : mixed
This method should generally not be called directly as the stack management should be taken care of by the application itself.
Parameters
- $request : Request