yii\web\HeaderCollection::setDefault PHP Method

setDefault() public method

If there is already a header with the same name, the new one will be ignored.
public setDefault ( string $name, string $value )
$name string the name of the header
$value string the value of the header
    public function setDefault($name, $value)
    {
        $name = strtolower($name);
        if (empty($this->_headers[$name])) {
            $this->_headers[$name][] = $value;
        }
        return $this;
    }