Skip to content

Commit

Permalink
Update docs for CookieComponent::delete().
Browse files Browse the repository at this point in the history
Refs #2182
  • Loading branch information
markstory committed Oct 29, 2013
1 parent 07f4779 commit a753718
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Cake/Controller/Component/CookieComponent.php
Expand Up @@ -307,11 +307,17 @@ public function check($key = null) {
* Delete a cookie value
*
* Optional [Name.], required key
* $this->Cookie->read('Name.key);
* $this->Cookie->delete('Name.key);
*
* You must use this method before any output is sent to the browser.
* Failure to do so will result in header already sent errors.
*
* This method will delete both the top level and 2nd level cookies set.
* For example assuming that $name = App, deleting `User` will delete
* both `App[User]` and any other cookie values like `App[User][email]`
* This is done to clean up cookie storage from before 2.4.3, where cookies
* were stored inconsistently.
*
* @param string $key Key of the value to be deleted
* @return void
* @link http://book.cakephp.org/2.0/en/core-libraries/components/cookie.html#CookieComponent::delete
Expand Down

0 comments on commit a753718

Please sign in to comment.