Total Complexity | 4 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Coverage | 33.33% |
Changes | 0 |
1 | <?php |
||
14 | class ElggCookie { |
||
15 | /** @var string */ |
||
16 | private $name; |
||
17 | |||
18 | /** @var string */ |
||
19 | public $value = ""; |
||
20 | |||
21 | /** @var int */ |
||
22 | public $expire = 0; |
||
23 | |||
24 | /** @var string */ |
||
25 | public $path = "/"; |
||
26 | |||
27 | /** @var string */ |
||
28 | public $domain = ""; |
||
29 | |||
30 | /** @var bool */ |
||
31 | public $secure = false; |
||
32 | |||
33 | /** @var bool */ |
||
34 | public $httpOnly = false; |
||
35 | |||
36 | /** |
||
37 | * Constructor |
||
38 | * |
||
39 | * @param string $name The name of the cookie. |
||
40 | */ |
||
41 | 7 | public function __construct($name) { |
|
43 | 7 | } |
|
44 | |||
45 | /** |
||
46 | * Get an attribute |
||
47 | * |
||
48 | * @param string $name Attribute name |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function __get($name) { |
||
55 | } |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Set the time the cookie expires |
||
60 | * |
||
61 | * Example: $cookie->setExpiresTime("+30 days"); |
||
62 | * |
||
63 | * @param string $time A time string appropriate for strtotime() |
||
64 | * @return void |
||
65 | */ |
||
66 | public function setExpiresTime($time) { |
||
70 |