function RequestStack::getParentRequest
Returns the parent request of the current.
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.
2 calls to RequestStack::getParentRequest()
- VirtualRequestStack::getParentRequest in vendor/
symfony/ http-kernel/ Debug/ VirtualRequestStack.php - Returns the parent request of the current.
- VirtualRequestStack::getParentRequest in vendor/
symfony/ http-kernel/ Debug/ VirtualRequestStack.php - Returns the parent request of the current.
1 method overrides RequestStack::getParentRequest()
- VirtualRequestStack::getParentRequest in vendor/
symfony/ http-kernel/ Debug/ VirtualRequestStack.php - Returns the parent request of the current.
File
-
vendor/
symfony/ http-foundation/ RequestStack.php, line 97
Class
- RequestStack
- Request stack that controls the lifecycle of requests.
Namespace
Symfony\Component\HttpFoundationCode
public function getParentRequest() : ?Request {
$pos = \count($this->requests) - 2;
return $this->requests[$pos] ?? null;
}