yii\web\CookieCollection::has PHP Méthode

has() public méthode

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
Résultat 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());
    }