Elgg  Version 1.11
ElggCookie.php
Go to the documentation of this file.
1 <?php
14 class ElggCookie {
16  private $name;
17 
19  public $value = "";
20 
22  public $expire = 0;
23 
25  public $path = "/";
26 
28  public $domain = "";
29 
31  public $secure = false;
32 
34  public $httpOnly = false;
35 
41  public function __construct($name) {
42  $this->name = $name;
43  }
44 
51  public function __get($name) {
52  // allow reading the private name attribute
53  if ($name === 'name') {
54  return $this->name;
55  }
56  }
57 
66  public function setExpiresTime($time) {
67  $this->expire = strtotime($time);
68  }
69 }
__construct($name)
Constructor.
Definition: ElggCookie.php:41
$site name
__get($name)
Get an attribute.
Definition: ElggCookie.php:51
setExpiresTime($time)
Set the time the cookie expires.
Definition: ElggCookie.php:66