@@ -184,7 +184,7 @@ function startup() {
184
184
/**
185
185
* Write a value to the $_COOKIE[$key];
186
186
*
187
- * Optional [Name.], reguired key, optional $value, optional $encrypt, optional $expires
187
+ * Optional [Name.], required key, optional $value, optional $encrypt, optional $expires
188
188
* $this->Cookie->write('[Name.]key, $value);
189
189
*
190
190
* By default all values are encrypted.
@@ -205,7 +205,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
205
205
}
206
206
$ this ->__encrypted = $ encrypt ;
207
207
$ this ->__expire ($ expires );
208
-
208
+
209
209
if (!is_array ($ key )) {
210
210
$ key = array ($ key => $ value );
211
211
}
@@ -214,7 +214,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
214
214
if (strpos ($ name , '. ' ) === false ) {
215
215
$ this ->__values [$ name ] = $ value ;
216
216
$ this ->__write ("[ $ name] " , $ value );
217
-
217
+
218
218
} else {
219
219
$ names = explode ('. ' , $ name , 2 );
220
220
if (!isset ($ this ->__values [$ names [0 ]])) {
@@ -230,7 +230,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
230
230
/**
231
231
* Read the value of the $_COOKIE[$key];
232
232
*
233
- * Optional [Name.], reguired key
233
+ * Optional [Name.], required key
234
234
* $this->Cookie->read(Name.key);
235
235
*
236
236
* @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) {
245
245
if (is_null ($ key )) {
246
246
return $ this ->__values ;
247
247
}
248
-
248
+
249
249
if (strpos ($ key , '. ' ) !== false ) {
250
250
$ names = explode ('. ' , $ key , 2 );
251
251
$ key = $ names [0 ];
@@ -263,7 +263,7 @@ function read($key = null) {
263
263
/**
264
264
* Delete a cookie value
265
265
*
266
- * Optional [Name.], reguired key
266
+ * Optional [Name.], required key
267
267
* $this->Cookie->read('Name.key);
268
268
*
269
269
* You must use this method before any output is sent to the browser.
@@ -344,11 +344,11 @@ function __expire($expires = null) {
344
344
return $ this ->__expires ;
345
345
}
346
346
$ this ->__reset = $ this ->__expires ;
347
-
347
+
348
348
if ($ expires == 0 ) {
349
349
return $ this ->__expires = 0 ;
350
350
}
351
-
351
+
352
352
if (is_integer ($ expires ) || is_numeric ($ expires )) {
353
353
return $ this ->__expires = $ now + intval ($ expires );
354
354
}
0 commit comments