getParentRequest() public method

Returns the parent request
public getParentRequest ( ) : ActionRequest | Request
return ActionRequest | Request
 /**
  * Get a new RequestMatcher for the Request's ParentRequest
  *
  * @return RequestMatcher
  * @api
  */
 public function getParentRequest()
 {
     if ($this->request === null || $this->request->isMainRequest()) {
         return new RequestMatcher();
     }
     $this->addWeight(1000000);
     return new RequestMatcher($this->request->getParentRequest(), $this);
 }
 /**
  * By design, the root request will always be an HTTP request because it is
  * the only of the two types which can be instantiated without having to pass
  * another request as the parent request.
  *
  * @test
  */
 public function anHttpRequestOrActionRequestIsRequiredAsParentRequest()
 {
     $this->assertSame($this->mockHttpRequest, $this->actionRequest->getParentRequest());
     $anotherActionRequest = new ActionRequest($this->actionRequest);
     $this->assertSame($this->actionRequest, $anotherActionRequest->getParentRequest());
 }
 /**
  * Get the path of the argument namespaces of all parent requests.
  * Example: mainrequest.subrequest.subsubrequest
  *
  * @param ActionRequest $request
  * @return string
  */
 protected function getRequestNamespacePath($request)
 {
     if (!$request instanceof Request) {
         $parentPath = $this->getRequestNamespacePath($request->getParentRequest());
         return $parentPath . ($parentPath !== '' && $request->getArgumentNamespace() !== '' ? '.' : '') . $request->getArgumentNamespace();
     }
     return '';
 }