src/PoHeader.php
public function setHeader(string $key, string $value): void
    {
        $this->buildStructuredHeaders();
        $lkey = strtolower($key);
        if (isset($this->structuredHeaders[$lkey])) {
            $this->structuredHeaders[$lkey]['value'] = $value;
        } else {
            $newHeader = array('key' => $key, 'value' => $value);
            $this->structuredHeaders[$lkey] = $newHeader;
        }
        $this->storeStructuredHeader();
    }
public function setHeader(string $key, string $value): void
    {
        $this->buildStructuredHeaders();
        $lkey = strtolower($key);
        if (isset($this->structuredHeaders[$lkey])) {
            $this->structuredHeaders[$lkey]['value'] = $value;
        } else {
            $newHeader = array('key' => $key, 'value' => $value);
            $this->structuredHeaders[$lkey] = $newHeader;
        }
        $this->storeStructuredHeader();
    }
public function setHeader ( string $ key , string $ value ) : void { $ this -> buildStructuredHeaders ( ) ; $ lkey = strtolower ( $ key ) ; if ( isset ( $ this -> structuredHeaders [ $ lkey ] ) ) { $ this -> structuredHeaders [ $ lkey ] [ 'value' ] = $ value ; } else { $ newHeader = array ( 'key' => $ key , 'value' => $ value ) ; $ this -> structuredHeaders [ $ lkey ] = $ newHeader ; } $ this -> storeStructuredHeader ( ) ; }
Set the value of a header string for a key.

@param string $key   name of header to set. If the header exists, the name is
case insensitive. If it is new the given case will be used
@param string $value value to set

@return void
Set the value of a header string for a key .