Elgg  Version master
ElggCookie.php
Go to the documentation of this file.
1 <?php
12 class ElggCookie {
13 
15  private $name;
16 
18  public $value = '';
19 
21  public $expire = 0;
22 
24  public $path = '/';
25 
27  public $domain = '';
28 
30  public $secure = false;
31 
33  public $httpOnly = false;
34 
40  public function __construct($name) {
41  $this->name = $name;
42  }
43 
50  public function __get($name) {
51  // allow reading the private name attribute
52  if ($name === 'name') {
53  return $this->name;
54  }
55  }
56 
65  public function setExpiresTime($time) {
66  $this->expire = strtotime($time);
67  }
68 }
if(!$annotation instanceof ElggAnnotation) $time
Definition: time.php:20
__construct($name)
Constructor.
Definition: ElggCookie.php:40
__get($name)
Get an attribute.
Definition: ElggCookie.php:50
$site name
Definition: settings.php:15
setExpiresTime($time)
Set the time the cookie expires.
Definition: ElggCookie.php:65