yii\web\CookieCollection::offsetGet PHP Method

offsetGet() public method

This method is required by the SPL interface [[\ArrayAccess]]. It is implicitly called when you use something like $cookie = $collection[$name];. This is equivalent to CookieCollection::get.
public offsetGet ( string $name ) : Cookie
$name string the cookie name
return Cookie the cookie with the specified name, null if the named cookie does not exist.
    public function offsetGet($name)
    {
        return $this->get($name);
    }