remove() public method
Removes a cookie.
If $removeFromBrowser
is true, the cookie will be removed from the browser. In this case, a cookie with outdated expiry will be added to the collection.
public void remove ( $cookie, $removeFromBrowser = true ) | ||
---|---|---|
$cookie | yii\web\Cookie|string |
The cookie object or the name of the cookie to be removed. |
$removeFromBrowser | boolean |
Whether to remove the cookie from browser |
throws | yii\base\InvalidCallException |
if the cookie collection is read only |
Please login to continue.