src/Controller/CheckRequest.php
public function getLocalReferer()
    {
        $request = $this->getRequest();
        $referer = $request->getHeaderLine('HTTP_REFERER');
        $host = $request->getHeaderLine('HTTP_HOST');

        return $referer && parse_url($referer, PHP_URL_HOST) === $host ? $referer : '';
    }
public function getLocalReferer()
    {
        $request = $this->getRequest();
        $referer = $request->getHeaderLine('HTTP_REFERER');
        $host = $request->getHeaderLine('HTTP_HOST');

        return $referer && parse_url($referer, PHP_URL_HOST) === $host ? $referer : '';
    }
public function getLocalReferer ( ) { $ request = $ this -> getRequest ( ) ; $ referer = $ request -> getHeaderLine ( 'HTTP_REFERER' ) ; $ host = $ request -> getHeaderLine ( 'HTTP_HOST' ) ; return $ referer && parse_url ( $ referer , PHP_URL_HOST ) === $ host ? $ referer : '' ; }
Returns the HTTP referer if it is on the current host

@return string
Returns the HTTP referer if it is on the current host