protected function getFirstTrustedProxyHeaderValue($type, Request $request)
    {
        $values = $this->getTrustedProxyHeaderValues($type, $request)->current();
        return $values !== null ? reset($values) : null;
    }
protected function getFirstTrustedProxyHeaderValue($type, Request $request)
    {
        $values = $this->getTrustedProxyHeaderValues($type, $request)->current();
        return $values !== null ? reset($values) : null;
    }
protected function getFirstTrustedProxyHeaderValue ( $ type , Request $ request ) { $ values = $ this -> getTrustedProxyHeaderValues ( $ type , $ request ) -> current ( ) ; return $ values !== null ? reset ( $ values ) : null ; }
Convenience getter for the first value of a given trusted proxy header.

@param string $type One of the HEADER_* constants
@param Request $request The request to get the trusted proxy header from
@return mixed|null The first value of this header type or NULL if this header type should not be trusted
Convenience getter for the first value of a given trusted proxy header .