Elgg  Version 4.x
ElggCookie.php
Go to the documentation of this file.
1 <?php
12 class ElggCookie {
14  private $name;
15 
17  public $value = "";
18 
20  public $expire = 0;
21 
23  public $path = "/";
24 
26  public $domain = "";
27 
29  public $secure = false;
30 
32  public $httpOnly = false;
33 
39  public function __construct($name) {
40  $this->name = $name;
41  }
42 
49  public function __get($name) {
50  // allow reading the private name attribute
51  if ($name === 'name') {
52  return $this->name;
53  }
54  }
55 
64  public function setExpiresTime($time) {
65  $this->expire = strtotime($time);
66  }
67 }
$site name
Definition: settings.php:21
if(!$annotation instanceof ElggAnnotation) $time
Definition: time.php:20
__construct($name)
Constructor.
Definition: ElggCookie.php:39
__get($name)
Get an attribute.
Definition: ElggCookie.php:49
setExpiresTime($time)
Set the time the cookie expires.
Definition: ElggCookie.php:64