public static function getReferrer(ServerRequestInterface $request)
    {
        if ($referrer = $request->getAttribute(self::REFERRER)) {
            return $referrer;
        }
        if ($referrer = Respond::session()->get(self::REFERRER)) {
            return $referrer;
        }
        $info = $request->getServerParams();

        return array_key_exists('HTTP_REFERER', $info) ? $info['HTTP_REFERER'] : '';
    }
public static function getReferrer(ServerRequestInterface $request)
    {
        if ($referrer = $request->getAttribute(self::REFERRER)) {
            return $referrer;
        }
        if ($referrer = Respond::session()->get(self::REFERRER)) {
            return $referrer;
        }
        $info = $request->getServerParams();

        return array_key_exists('HTTP_REFERER', $info) ? $info['HTTP_REFERER'] : '';
    }
public static function getReferrer ( ServerRequestInterface $ request ) { if ( $ referrer = $ request -> getAttribute ( self :: REFERRER ) ) { return $ referrer ; } if ( $ referrer = Respond :: session ( ) -> get ( self :: REFERRER ) ) { return $ referrer ; } $ info = $ request -> getServerParams ( ) ; return array_key_exists ( 'HTTP_REFERER' , $ info ) ? $ info [ 'HTTP_REFERER' ] : '' ; }
get the referrer uri set by withReferrer, or the HTTP_REFERER if not set.

@param ServerRequestInterface $request
@return string
get the referrer uri set by withReferrer or the HTTP_REFERER if not set .