src/SourceAdapters/RemoteUrlAdapter.php
private function getHeader($key)
    {
        if (! $this->headers) {
            $this->headers = $this->getHeaders();
        }
        if (array_key_exists($key, $this->headers)) {
            //if redirects encountered, return the final values
            if (is_array($this->headers[$key])) {
                return end($this->headers[$key]);
            } else {
                return $this->headers[$key];
            }
        }
    }
private function getHeader($key)
    {
        if (! $this->headers) {
            $this->headers = $this->getHeaders();
        }
        if (array_key_exists($key, $this->headers)) {
            //if redirects encountered, return the final values
            if (is_array($this->headers[$key])) {
                return end($this->headers[$key]);
            } else {
                return $this->headers[$key];
            }
        }
    }
private function getHeader ( $ key ) { if ( ! $ this -> headers ) { $ this -> headers = $ this -> getHeaders ( ) ; } if ( array_key_exists ( $ key , $ this -> headers ) ) { //if redirects encountered, return the final values if ( is_array ( $ this -> headers [ $ key ] ) ) { return end ( $ this -> headers [ $ key ] ) ; } else { return $ this -> headers [ $ key ] ; } } }
Read a header value by name from the remote content.

@param  mixed $key Header name
@return mixed
Read a header value by name from the remote content .