1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
cookie.php
См. документацию.
1<?php
2
9
10namespace Bitrix\Main\Web\Http;
11
12class Cookie
13{
14 public const SAME_SITE_NONE = 'None';
15 public const SAME_SITE_LAX = 'Lax';
16 public const SAME_SITE_STRICT = 'Strict';
17
18 protected $domain;
19 protected $expires;
20 protected $httpOnly = true;
21 protected $name;
22 protected $path = '/';
23 protected $secure = false;
24 protected $value;
25 protected $sameSite;
26
33 public function __construct(string $name, ?string $value, int $expires = 0)
34 {
35 $this->name = $name;
36 $this->value = $value;
37 $this->expires = $expires;
38 }
39
40 public function setDomain(string $domain): self
41 {
42 $this->domain = $domain;
43
44 return $this;
45 }
46
47 public function getDomain(): ?string
48 {
49 return $this->domain;
50 }
51
52 public function setExpires(int $expires): self
53 {
54 $this->expires = $expires;
55
56 return $this;
57 }
58
59 public function getExpires(): int
60 {
61 return $this->expires;
62 }
63
64 public function setHttpOnly(bool $httpOnly): self
65 {
66 $this->httpOnly = $httpOnly;
67
68 return $this;
69 }
70
71 public function getHttpOnly(): bool
72 {
73 return $this->httpOnly;
74 }
75
76 public function setName(string $name): self
77 {
78 $this->name = $name;
79
80 return $this;
81 }
82
83 public function getName(): string
84 {
85 return $this->name;
86 }
87
88 public function setPath(string $path): self
89 {
90 $this->path = $path;
91
92 return $this;
93 }
94
95 public function getPath(): string
96 {
97 return $this->path;
98 }
99
100 public function setSecure(bool $secure): self
101 {
102 $this->secure = $secure;
103
104 return $this;
105 }
106
107 public function getSecure(): bool
108 {
109 return $this->secure;
110 }
111
112 public function setValue(?string $value): self
113 {
114 $this->value = $value;
115
116 return $this;
117 }
118
119 public function getValue(): ?string
120 {
121 return $this->value;
122 }
123
124 public function setSameSite(?string $sameSite): self
125 {
126 $this->sameSite = $sameSite;
127
128 return $this;
129 }
130
131 public function getSameSite(): ?string
132 {
133 return $this->sameSite;
134 }
135}
path
Определения template_copy.php:201