original_string: 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 : '';
      }
code: 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 : '';
      }
code_tokens: 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 : '' ; }
docstring: Returns the HTTP referer if it is on the current host
  
  @return string
docstring_tokens: Returns the HTTP referer if it is on the current host