public function addHeader($name, $value = null) {
        if ($this->canSetHeaders()) {
            if ($value === null) {
                $value = trim(substr($name, strpos($name, ':') + 1));
                $name = trim(substr($name, 0, strpos($name, ':')));
            }

            $this->headers[$name] = $value;
        }
    }
public function addHeader($name, $value = null) {
        if ($this->canSetHeaders()) {
            if ($value === null) {
                $value = trim(substr($name, strpos($name, ':') + 1));
                $name = trim(substr($name, 0, strpos($name, ':')));
            }

            $this->headers[$name] = $value;
        }
    }
public function addHeader ( $ name , $ value = null ) { if ( $ this -> canSetHeaders ( ) ) { if ( $ value === null ) { $ value = trim ( substr ( $ name , strpos ( $ name , ':' ) + 1 ) ) ; $ name = trim ( substr ( $ name , 0 , strpos ( $ name , ':' ) ) ) ; } $ this -> headers [ $ name ] = $ value ; } }
Adds an HTTP header to the current response.

@param string @name The name of the HTTP header to add value to.
@param string @value The string to add to the header.

@return void
Adds an HTTP header to the current response .