ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilCookie.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
27 class ilCookie
28 {
29  private string $name;
30  private string $value = '';
31  private int $expire = 0;
32  private string $path = '';
33  private string $domain = '';
34  private bool $secure = false;
35  private bool $http_only = false;
36 
37  public function __construct(string $a_name)
38  {
39  $this->name = $a_name;
40  }
41 
42  public function setName(string $a_name): void
43  {
44  $this->name = $a_name;
45  }
46 
50  public function getName(): string
51  {
52  return $this->name;
53  }
54 
59  public function setValue(string $a_value): void
60  {
61  $this->value = $a_value;
62  }
63 
64  public function getValue(): string
65  {
66  return $this->value;
67  }
68 
69  public function setExpire(int $a_expire): void
70  {
71  $this->expire = $a_expire;
72  }
73 
74  public function getExpire(): int
75  {
76  return $this->expire;
77  }
78 
79  public function setPath(string $a_path): void
80  {
81  $this->path = $a_path;
82  }
83 
84  public function getPath(): string
85  {
86  return $this->path;
87  }
88 
89  public function setDomain(string $a_domain): void
90  {
91  $this->domain = $a_domain;
92  }
93 
94  public function getDomain(): string
95  {
96  return $this->domain;
97  }
98 
99  public function setSecure(bool $a_status): void
100  {
101  $this->secure = $a_status;
102  }
103 
104  public function isSecure(): bool
105  {
106  return $this->secure;
107  }
108 
109  public function setHttpOnly(bool $a_http_only): void
110  {
111  $this->http_only = $a_http_only;
112  }
113 
114  public function isHttpOnly(): bool
115  {
116  return $this->http_only;
117  }
118 }
setHttpOnly(bool $a_http_only)
bool $http_only
__construct(string $a_name)
setExpire(int $a_expire)
getName()
Get name.
setDomain(string $a_domain)
setPath(string $a_path)
setSecure(bool $a_status)
setName(string $a_name)
string $path
Representation of an HTTP cookie.
setValue(string $a_value)
Currently no restriction on cookie length.
string $name
string $domain
string $value