Adding documentation for CookieComponent

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5867 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2007-10-22 20:44:51 +00:00
parent a9a9a824e2
commit ffde2a06dd

View file

@ -197,7 +197,7 @@ class CookieComponent extends Object {
} }
} }
/** /**
* Write a value to the $_COOKIE[$config]; * Write a value to the $_COOKIE[$key];
* *
* Optional [Name.], reguired key, optional $value, optional $encrypt, optional $expires * Optional [Name.], reguired key, optional $value, optional $encrypt, optional $expires
* $this->Cookie->write('[Name.]key, $value); * $this->Cookie->write('[Name.]key, $value);
@ -208,10 +208,10 @@ class CookieComponent extends Object {
* You must use this method before any output is sent to the browser. * You must use this method before any output is sent to the browser.
* Failure to do so will result in header already sent errors. * Failure to do so will result in header already sent errors.
* *
* @param mixed $key * @param mixed $key Key for the value
* @param mixed $value * @param mixed $value Value
* @param boolean $encrypt * @param boolean $encrypt Set to true to encrypt value, false otherwise
* @param string $expires * @param string $expires Can be either Unix timestamp, or date string
* @access public * @access public
*/ */
function write($key, $value = null, $encrypt = true, $expires = null) { function write($key, $value = null, $encrypt = true, $expires = null) {
@ -247,13 +247,13 @@ class CookieComponent extends Object {
} }
} }
/** /**
* Read the value of the $_COOKIE[$var]; * Read the value of the $_COOKIE[$key];
* *
* Optional [Name.], reguired key * Optional [Name.], reguired key
* $this->Cookie->read(Name.key); * $this->Cookie->read(Name.key);
* *
* @param mixed $key * @param mixed $key Key of the value to be obtained. If none specified, obtain map key => values
* @return string or null * @return string or null, value for specified key
* @access public * @access public
*/ */
function read($key = null) { function read($key = null) {
@ -290,7 +290,7 @@ class CookieComponent extends Object {
* You must use this method before any output is sent to the browser. * You must use this method before any output is sent to the browser.
* Failure to do so will result in header already sent errors. * Failure to do so will result in header already sent errors.
* *
* @param string $name * @param string $key Key of the value to be deleted
* @access public * @access public
*/ */
function del($key) { function del($key) {
@ -340,7 +340,7 @@ class CookieComponent extends Object {
/** /**
* Will allow overriding default encryption method. * Will allow overriding default encryption method.
* *
* @param string $type * @param string $type Encryption method
* @access public * @access public
* @todo NOT IMPLEMENTED * @todo NOT IMPLEMENTED
*/ */
@ -357,8 +357,8 @@ class CookieComponent extends Object {
* CookieComponent::write(string, string, boolean, 8400); * CookieComponent::write(string, string, boolean, 8400);
* CookieComponent::write(string, string, boolean, '5 Days'); * CookieComponent::write(string, string, boolean, '5 Days');
* *
* @param mixed $expires * @param mixed $expires Can be either Unix timestamp, or date string
* @return int * @return int Unix timestamp
* @access private * @access private
*/ */
function __expire($expires = null) { function __expire($expires = null) {
@ -376,8 +376,8 @@ class CookieComponent extends Object {
/** /**
* Set cookie * Set cookie
* *
* @param string $name * @param string $name Name for cookie
* @param string $value * @param string $value Value for cookie
* @access private * @access private
*/ */
function __write($name, $value) { function __write($name, $value) {
@ -392,7 +392,7 @@ class CookieComponent extends Object {
/** /**
* Sets a cookie expire time to remove cookie value * Sets a cookie expire time to remove cookie value
* *
* @param string $name * @param string $name Name of cookie
* @access private * @access private
*/ */
function __delete($name) { function __delete($name) {
@ -401,8 +401,8 @@ class CookieComponent extends Object {
/** /**
* Encrypts $value using var $type method in Security class * Encrypts $value using var $type method in Security class
* *
* @param string $value * @param string $value Value to encrypt
* @return encrypted string * @return string encrypted string
* @access private * @access private
*/ */
function __encrypt($value) { function __encrypt($value) {
@ -419,8 +419,8 @@ class CookieComponent extends Object {
/** /**
* Decrypts $value using var $type method in Security class * Decrypts $value using var $type method in Security class
* *
* @param string $values * @param array $values Values to decrypt
* @return decrypted string * @return string decrypted string
* @access private * @access private
*/ */
function __decrypt($values) { function __decrypt($values) {
@ -456,8 +456,8 @@ class CookieComponent extends Object {
* Creates an array from the $name parameter which allows the dot notation * Creates an array from the $name parameter which allows the dot notation
* similar to one used by Session and Configure classes * similar to one used by Session and Configure classes
* *
* @param string $name * @param string $name Name with or without dot notation
* @return array * @return array Extracted names
* @access private * @access private
*/ */
function __cookieVarNames($name) { function __cookieVarNames($name) {
@ -473,8 +473,8 @@ class CookieComponent extends Object {
/** /**
* Implode method to keep keys are multidimensional arrays * Implode method to keep keys are multidimensional arrays
* *
* @param array $array * @param array $array Map of key and values
* @return string * @return string String in the form key1|value1,key2|value2
* @access private * @access private
*/ */
function __implode($array) { function __implode($array) {
@ -487,8 +487,8 @@ class CookieComponent extends Object {
/** /**
* Explode method to return array from string set in CookieComponent::__implode() * Explode method to return array from string set in CookieComponent::__implode()
* *
* @param string $string * @param string $string String in the form key1|value1,key2|value2
* @return array * @return array Map of key and values
* @access private * @access private
*/ */
function __explode($string) { function __explode($string) {