yii\web\CookieCollection::has PHP Method

has() public method

Note that if a cookie is marked for deletion from browser, this method will return false.
See also: remove()
public has ( string $name ) : boolean
$name string the cookie name
return 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());
    }