Application::unsetCookie
COOKIEデータを削除
説明
public void Application::unsetCookie( [ string $name = "" ] )
COOKIEデータを削除します。
引数
名前 | データ型 | デフォルト | 備考 |
---|---|---|---|
$name | string | Cookieパラメータキー |
例
コントローラー - First.php
$this->setCookie('foo', 'bar');
コントローラー - Second.php
$this->getCookie('foo'); // -> bar
コントローラー - Third.php
$this->unsetCookie('foo');
echo $this->getCookie('foo'); // -> ''