Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Typos in documentation: reguired -> required

  • Loading branch information...
commit c55a57927c0ec3b20cae7515de1ebb972bfe3c79 1 parent 1186bc5
@markomarkovic markomarkovic authored predominant committed
Showing with 8 additions and 8 deletions.
  1. +8 −8 cake/libs/controller/components/cookie.php
View
16 cake/libs/controller/components/cookie.php
@@ -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.
@@ -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);
}
@@ -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]])) {
@@ -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
@@ -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];
@@ -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.
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.