ILIAS  release_8 Revision v8.25
class.ilCookie.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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}
Representation of an HTTP cookie.
bool $http_only
setExpire(int $a_expire)
setDomain(string $a_domain)
string $value
setPath(string $a_path)
string $name
__construct(string $a_name)
setHttpOnly(bool $a_http_only)
string $domain
getName()
Get name.
setName(string $a_name)
setSecure(bool $a_status)
string $path
setValue(string $a_value)
Currently no restriction on cookie length.