framework/web/HeaderCollection.php
public function get($name, $default = null, $first = true)
    {
        $name = strtolower($name);
        if (isset($this->_headers[$name])) {
            return $first ? reset($this->_headers[$name]) : $this->_headers[$name];
        }

        return $default;
    }
public function get($name, $default = null, $first = true)
    {
        $name = strtolower($name);
        if (isset($this->_headers[$name])) {
            return $first ? reset($this->_headers[$name]) : $this->_headers[$name];
        }

        return $default;
    }
public function get ( $ name , $ default = null , $ first = true ) { $ name = strtolower ( $ name ) ; if ( isset ( $ this -> _headers [ $ name ] ) ) { return $ first ? reset ( $ this -> _headers [ $ name ] ) : $ this -> _headers [ $ name ] ; } return $ default ; }
Returns the named header(s).
@param string $name the name of the header to return
@param mixed $default the value to return in case the named header does not exist
@param bool $first whether to only return the first header of the specified name.
If false, all headers of the specified name will be returned.
@return string|array the named header(s). If `$first` is true, a string will be returned;
If `$first` is false, an array will be returned.
Returns the named header ( s ) .