public function getReferringRequest()
    {
        if ($this->referringRequest !== null) {
            return $this->referringRequest;
        }
        if (!isset($this->internalArguments['__referrer'])) {
            return null;
        }
        if (is_array($this->internalArguments['__referrer'])) {
            $referrerArray = $this->internalArguments['__referrer'];

            $referringRequest = new ActionRequest($this->getHttpRequest());

            $arguments = [];
            if (isset($referrerArray['arguments'])) {
                $serializedArgumentsWithHmac = $referrerArray['arguments'];
                $serializedArguments = $this->hashService->validateAndStripHmac($serializedArgumentsWithHmac);
                $arguments = unserialize(base64_decode($serializedArguments));
                unset($referrerArray['arguments']);
            }

            $referringRequest->setArguments(Arrays::arrayMergeRecursiveOverrule($arguments, $referrerArray));
            return $referringRequest;
        } else {
            $this->referringRequest = $this->internalArguments['__referrer'];
        }
        return $this->referringRequest;
    }
public function getReferringRequest()
    {
        if ($this->referringRequest !== null) {
            return $this->referringRequest;
        }
        if (!isset($this->internalArguments['__referrer'])) {
            return null;
        }
        if (is_array($this->internalArguments['__referrer'])) {
            $referrerArray = $this->internalArguments['__referrer'];

            $referringRequest = new ActionRequest($this->getHttpRequest());

            $arguments = [];
            if (isset($referrerArray['arguments'])) {
                $serializedArgumentsWithHmac = $referrerArray['arguments'];
                $serializedArguments = $this->hashService->validateAndStripHmac($serializedArgumentsWithHmac);
                $arguments = unserialize(base64_decode($serializedArguments));
                unset($referrerArray['arguments']);
            }

            $referringRequest->setArguments(Arrays::arrayMergeRecursiveOverrule($arguments, $referrerArray));
            return $referringRequest;
        } else {
            $this->referringRequest = $this->internalArguments['__referrer'];
        }
        return $this->referringRequest;
    }
public function getReferringRequest ( ) { if ( $ this -> referringRequest !== null ) { return $ this -> referringRequest ; } if ( ! isset ( $ this -> internalArguments [ '__referrer' ] ) ) { return null ; } if ( is_array ( $ this -> internalArguments [ '__referrer' ] ) ) { $ referrerArray = $ this -> internalArguments [ '__referrer' ] ; $ referringRequest = new ActionRequest ( $ this -> getHttpRequest ( ) ) ; $ arguments = [ ] ; if ( isset ( $ referrerArray [ 'arguments' ] ) ) { $ serializedArgumentsWithHmac = $ referrerArray [ 'arguments' ] ; $ serializedArguments = $ this -> hashService -> validateAndStripHmac ( $ serializedArgumentsWithHmac ) ; $ arguments = unserialize ( base64_decode ( $ serializedArguments ) ) ; unset ( $ referrerArray [ 'arguments' ] ) ; } $ referringRequest -> setArguments ( Arrays :: arrayMergeRecursiveOverrule ( $ arguments , $ referrerArray ) ) ; return $ referringRequest ; } else { $ this -> referringRequest = $ this -> internalArguments [ '__referrer' ] ; } return $ this -> referringRequest ; }
Returns an ActionRequest which referred to this request, if any.

The referring request is not set or determined automatically but must be
explicitly set through the corresponding internal argument "__referrer".
This mechanism is used by Flow's form and validation mechanisms.

@return ActionRequest the referring request, or NULL if no referrer found
Returns an ActionRequest which referred to this request if any .