Inheritance diagram for CookieComponent:

Public Member Functions | |
| __cookieVarNames ($name) | |
| __decrypt ($values) | |
| __delete ($name) | |
| __encrypt ($value) | |
| __expire ($expires=null) | |
| __explode ($string) | |
| __implode ($array) | |
| __write ($name, $value) | |
| del ($key) | |
| destroy () | |
| initialize (&$controller, $settings) | |
| read ($key=null) | |
| startup () | |
| type ($type= 'cipher') | |
| write ($key, $value=null, $encrypt=true, $expires=null) | |
Public Attributes | |
| $__expires = 0 | |
| $__reset = null | |
| $__type = 'cipher' | |
| $__values = array() | |
| $domain = '' | |
| $key = null | |
| $name = 'CakeCookie' | |
| $path = '/' | |
| $secure = false | |
| $time = null | |
Definition at line 40 of file cookie.php.
| CookieComponent::__cookieVarNames | ( | $ | name | ) |
Creates an array from the $name parameter which allows the dot notation similar to one used by Session and Configure classes
| string | $name Name with or without dot notation |
Definition at line 442 of file cookie.php.
References $name.
| CookieComponent::__decrypt | ( | $ | values | ) |
Decrypts $value using var $type method in Security class
| array | $values Values to decrypt |
Definition at line 405 of file cookie.php.
References $key, $name, and __explode().
| CookieComponent::__delete | ( | $ | name | ) |
| CookieComponent::__encrypt | ( | $ | value | ) |
Encrypts $value using var $type method in Security class
| string | $value Value to encrypt |
Definition at line 387 of file cookie.php.
References __implode().
Referenced by __write().
| CookieComponent::__expire | ( | $ | expires = null |
) |
Set the expire time for a session variable.
Creates a new expire time for a session variable. $expire can be either integer Unix timestamp or a date string.
Used by write() CookieComponent::write(string, string, boolean, 8400); CookieComponent::write(string, string, boolean, '5 Days');
| mixed | $expires Can be either Unix timestamp, or date string |
Definition at line 345 of file cookie.php.
| CookieComponent::__explode | ( | $ | string | ) |
Explode method to return array from string set in CookieComponent::__implode()
| string | $string String in the form key1|value1,key2|value2 |
Definition at line 473 of file cookie.php.
References $key.
Referenced by __decrypt().
| CookieComponent::__implode | ( | $ | array | ) |
Implode method to keep keys are multidimensional arrays
| array | $array Map of key and values |
Definition at line 459 of file cookie.php.
References $key.
Referenced by __encrypt().
| CookieComponent::__write | ( | $ | name, | |
| $ | value | |||
| ) |
Set cookie
| string | $name Name for cookie | |
| string | $value Value for cookie private |
Definition at line 363 of file cookie.php.
References __encrypt(), and name().
Referenced by write().
| CookieComponent::del | ( | $ | key | ) |
Delete a cookie value
Optional [Name.], reguired key $this->Cookie->read('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.
| string | $key Key of the value to be deleted |
Definition at line 274 of file cookie.php.
References $key, $name, __cookieVarNames(), __delete(), and read().
| CookieComponent::destroy | ( | ) |
Destroy current cookie
You must use this method before any output is sent to the browser. Failure to do so will result in header already sent errors.
Definition at line 305 of file cookie.php.
References $key, $name, __decrypt(), __delete(), and name().
| CookieComponent::initialize | ( | &$ | controller, | |
| $ | settings | |||
| ) |
Main execution method.
| object | $controller A reference to the instantiating controller object public |
Definition at line 159 of file cookie.php.
References Object::_set(), and Configure::read().
| CookieComponent::read | ( | $ | key = null |
) |
Read the value of the $_COOKIE[$key];
Optional [Name.], reguired key $this->Cookie->read(Name.key);
| mixed | $key Key of the value to be obtained. If none specified, obtain map key => values |
Definition at line 236 of file cookie.php.
References $key, $name, __cookieVarNames(), __decrypt(), and name().
Referenced by del().
| CookieComponent::startup | ( | ) |
Start CookieComponent for use in the controller
public
Definition at line 168 of file cookie.php.
References __decrypt(), __expire(), and name().
| CookieComponent::type | ( | $ | type = 'cipher' |
) |
Will allow overriding default encryption method.
| string | $type Encryption method public |
Definition at line 328 of file cookie.php.
| CookieComponent::write | ( | $ | key, | |
| $ | value = null, |
|||
| $ | encrypt = true, |
|||
| $ | expires = null | |||
| ) |
Write a value to the $_COOKIE[$key];
Optional [Name.], reguired key, optional $value, optional $encrypt, optional $expires $this->Cookie->write('[Name.]key, $value);
By default all values are encrypted. You must pass $encrypt false to store values in clear test
You must use this method before any output is sent to the browser. Failure to do so will result in header already sent errors.
| mixed | $key Key for the value | |
| mixed | $value Value | |
| boolean | $encrypt Set to true to encrypt value, false otherwise | |
| string | $expires Can be either Unix timestamp, or date string public |
Definition at line 193 of file cookie.php.
References $key, $name, __cookieVarNames(), __expire(), and __write().
| CookieComponent::$__expires = 0 |
Definition at line 152 of file cookie.php.
| CookieComponent::$__reset = null |
Definition at line 143 of file cookie.php.
| CookieComponent::$__type = 'cipher' |
Definition at line 136 of file cookie.php.
| CookieComponent::$__values = array() |
Definition at line 125 of file cookie.php.
| CookieComponent::$domain = '' |
Definition at line 92 of file cookie.php.
| CookieComponent::$key = null |
Definition at line 115 of file cookie.php.
Referenced by __decrypt(), __explode(), __implode(), del(), destroy(), read(), and write().
| CookieComponent::$name = 'CakeCookie' |
Definition at line 50 of file cookie.php.
Referenced by __cookieVarNames(), __decrypt(), __delete(), del(), destroy(), read(), and write().
| CookieComponent::$path = '/' |
Definition at line 77 of file cookie.php.
| CookieComponent::$secure = false |
Definition at line 105 of file cookie.php.
| CookieComponent::$time = null |
Definition at line 62 of file cookie.php.
1.4.7