RequestStack
in package
Request stack that controls the lifecycle of requests.
Tags
Table of Contents
- $requests : array<string|int, Request>
- getCurrentRequest() : Request|null
- getMasterRequest() : Request|null
- Gets the master Request.
- getParentRequest() : Request|null
- Returns the parent request of the current.
- 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 —getMasterRequest()
Gets the master Request.
public
getMasterRequest() : Request|null
Be warned that making your code aware of the master request might make it un-compatible with other features of your framework like ESI support.
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 master request, it returns null.
Return values
Request|null —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