src/HeaderCollection.php
public function addHeader(string $name, string $value): bool
    {

        /* Initialize the return value */
        $isSet = false;

        /* If the given parameters aren't empty */
        if (!empty($name) && !empty($value)) {

            /* Assign the values */
            $this->offsetSet($name, $value);
            $isSet = true;
        }

        return $isSet;
    }
public function addHeader(string $name, string $value): bool
    {

        /* Initialize the return value */
        $isSet = false;

        /* If the given parameters aren't empty */
        if (!empty($name) && !empty($value)) {

            /* Assign the values */
            $this->offsetSet($name, $value);
            $isSet = true;
        }

        return $isSet;
    }
public function addHeader ( string $ name , string $ value ) : bool { /* Initialize the return value */ $ isSet = false ; /* If the given parameters aren't empty */ if ( ! empty ( $ name ) && ! empty ( $ value ) ) { /* Assign the values */ $ this -> offsetSet ( $ name , $ value ) ; $ isSet = true ; } return $ isSet ; }
Adds a new Header. If the header already exists it is overwritten.

@param string $name
@param string $value
@return bool
Adds a new Header . If the header already exists it is overwritten .