yii\web\HeaderCollection::offsetSet PHP Метод

offsetSet() публичный Метод

This method is required by the SPL interface [[\ArrayAccess]]. It is implicitly called when you use something like $collection[$name] = $header;. This is equivalent to HeaderCollection::add.
public offsetSet ( string $name, string $value )
$name string the header name
$value string the header value to be added
    public function offsetSet($name, $value)
    {
        $this->set($name, $value);
    }