public function removeCookie(string $name, bool $defer = false): self
    {
        if ($this->type == self::TYPE_REQUEST) {
            throw new HttpException('You cannot modify request cookies');
        }

        unset($this->cookies[$name]);
        if (!$defer) { // remove instantly
            $this->sendCookie($name, null, 0);
        }

        return $this;
    }
public function removeCookie(string $name, bool $defer = false): self
    {
        if ($this->type == self::TYPE_REQUEST) {
            throw new HttpException('You cannot modify request cookies');
        }

        unset($this->cookies[$name]);
        if (!$defer) { // remove instantly
            $this->sendCookie($name, null, 0);
        }

        return $this;
    }
public function removeCookie ( string $ name , bool $ defer = false ) : self { if ( $ this -> type == self :: TYPE_REQUEST ) { throw new HttpException ( 'You cannot modify request cookies' ) ; } unset ( $ this -> cookies [ $ name ] ) ; if ( ! $ defer ) { // remove instantly $ this -> sendCookie ( $ name , null , 0 ) ; } return $ this ; }
Remove cookie.
@param  string $name
@param  bool   $defer
@return self
@throws froq\http\HttpException
Remove cookie .