public function RequestStack::getParentRequest in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-foundation/RequestStack.php \Symfony\Component\HttpFoundation\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 master request, it returns null.
Return value
Request|null
File
- vendor/
symfony/ http-foundation/ RequestStack.php, line 93
Class
- RequestStack
- Request stack that controls the lifecycle of requests.
Namespace
Symfony\Component\HttpFoundationCode
public function getParentRequest() {
$pos = count($this->requests) - 2;
if (!isset($this->requests[$pos])) {
return;
}
return $this->requests[$pos];
}