Skip to content

Commit

Permalink
Typos in documentation: reguired -> required
Browse files Browse the repository at this point in the history
  • Loading branch information
markomarkovic authored and predominant committed Nov 30, 2010
1 parent 1186bc5 commit c55a579
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cake/libs/controller/components/cookie.php
Expand Up @@ -184,7 +184,7 @@ function startup() {
/**
* Write a value to the $_COOKIE[$key];
*
* Optional [Name.], reguired key, optional $value, optional $encrypt, optional $expires
* Optional [Name.], required key, optional $value, optional $encrypt, optional $expires
* $this->Cookie->write('[Name.]key, $value);
*
* By default all values are encrypted.
Expand All @@ -205,7 +205,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
}
$this->__encrypted = $encrypt;
$this->__expire($expires);

if (!is_array($key)) {
$key = array($key => $value);
}
Expand All @@ -214,7 +214,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
if (strpos($name, '.') === false) {
$this->__values[$name] = $value;
$this->__write("[$name]", $value);

} else {
$names = explode('.', $name, 2);
if (!isset($this->__values[$names[0]])) {
Expand All @@ -230,7 +230,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
/**
* Read the value of the $_COOKIE[$key];
*
* Optional [Name.], reguired key
* Optional [Name.], required key
* $this->Cookie->read(Name.key);
*
* @param mixed $key Key of the value to be obtained. If none specified, obtain map key => values
Expand All @@ -245,7 +245,7 @@ function read($key = null) {
if (is_null($key)) {
return $this->__values;
}

if (strpos($key, '.') !== false) {
$names = explode('.', $key, 2);
$key = $names[0];
Expand All @@ -263,7 +263,7 @@ function read($key = null) {
/**
* Delete a cookie value
*
* Optional [Name.], reguired key
* Optional [Name.], required key
* $this->Cookie->read('Name.key);
*
* You must use this method before any output is sent to the browser.
Expand Down Expand Up @@ -344,11 +344,11 @@ function __expire($expires = null) {
return $this->__expires;
}
$this->__reset = $this->__expires;

if ($expires == 0) {
return $this->__expires = 0;
}

if (is_integer($expires) || is_numeric($expires)) {
return $this->__expires = $now + intval($expires);
}
Expand Down

0 comments on commit c55a579

Please sign in to comment.