yii\web\CookieCollection::has PHP Метод

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

Note that if a cookie is marked for deletion from browser, this method will return false.
См. также: remove()
public has ( string $name ) : boolean
$name string the cookie name
Результат boolean whether the named cookie exists
    public function has($name)
    {
        return isset($this->_cookies[$name]) && $this->_cookies[$name]->value !== '' && ($this->_cookies[$name]->expire === null || $this->_cookies[$name]->expire >= time());
    }