add curlcode
[mdref/mdref-http] / http / Cookie / toArray.md
1 # array http\Cookie::toArray()
2
3 Get the cookie list as array.
4
5 ## Params:
6
7 None.
8
9 ## Returns:
10
11 * array, the cookie list as array.
12
13 ## Example:
14
15 <?php
16 $cookie = new http\Cookie("country=us; secure");
17 var_dump($cookie->toArray());
18 ?>
19
20 Yields:
21
22 array(7) {
23 ["cookies"]=>
24 array(1) {
25 ["country"]=>
26 string(2) "us"
27 }
28 ["extras"]=>
29 array(0) {
30 }
31 ["flags"]=>
32 int(16)
33 ["expires"]=>
34 int(-1)
35 ["max-age"]=>
36 int(-1)
37 ["path"]=>
38 string(0) ""
39 ["domain"]=>
40 string(0) ""
41 }