Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
sessionlocalstorage.php
1
<?php
2
namespace
Bitrix\Main\Data\LocalStorage
;
3
4
final
class
SessionLocalStorage
implements
\ArrayAccess, \Countable, \IteratorAggregate
5
{
6
private
array $data = [];
7
private
string
$uniqueName;
8
private
string
$name;
9
10
public
function
__construct
(
string
$uniqueName,
string
$name)
11
{
12
$this->uniqueName = $uniqueName;
13
$this->name = $name;
14
}
15
19
public
function
getUniqueName
(): string
20
{
21
return
$this->uniqueName;
22
}
23
27
public
function
getName
(): string
28
{
29
return
$this->name;
30
}
31
36
public
function
setUniqueName
(
string
$uniqueName): self
37
{
38
$this->uniqueName = $uniqueName;
39
40
return
$this;
41
}
42
46
public
function
getData
(): array
47
{
48
return
$this->data;
49
}
50
55
public
function
setData
(array $data)
56
{
57
$this->data = $data;
58
59
return
$this;
60
}
61
62
public
function
&
get
($key)
63
{
64
return
$this->data[$key];
65
}
66
67
public
function
set
($key, $value): self
68
{
69
$this->data[$key] = $value;
70
71
return
$this;
72
}
73
74
public
function
clear
(): void
75
{
76
$this->data = [];
77
}
78
79
public
function
offsetExists
($offset): bool
80
{
81
return
isset($this->data[$offset]);
82
}
83
84
#[\ReturnTypeWillChange]
85
public
function
&
offsetGet
($offset)
86
{
87
return
$this->
get
($offset);
88
}
89
90
public
function
offsetSet
($offset, $value): void
91
{
92
if
($offset ===
null
)
93
{
94
$this->data[] = $value;
95
}
96
else
97
{
98
$this->data[$offset] = $value;
99
}
100
}
101
102
public
function
offsetUnset
($offset): void
103
{
104
unset($this->data[$offset]);
105
}
106
107
public
function
count
(): int
108
{
109
return
count
($this->data);
110
}
111
112
public
function
getIterator
(): \ArrayIterator
113
{
114
return
new \ArrayIterator($this->
getData
());
115
}
116
}
Bitrix\Main\Data\LocalStorage\SessionLocalStorage
Definition
sessionlocalstorage.php:5
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\offsetUnset
offsetUnset($offset)
Definition
sessionlocalstorage.php:102
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\offsetExists
offsetExists($offset)
Definition
sessionlocalstorage.php:79
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\getName
getName()
Definition
sessionlocalstorage.php:27
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\getIterator
getIterator()
Definition
sessionlocalstorage.php:112
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\__construct
__construct(string $uniqueName, string $name)
Definition
sessionlocalstorage.php:10
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\getData
getData()
Definition
sessionlocalstorage.php:46
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\setData
setData(array $data)
Definition
sessionlocalstorage.php:55
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\clear
clear()
Definition
sessionlocalstorage.php:74
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\offsetGet
& offsetGet($offset)
Definition
sessionlocalstorage.php:85
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\offsetSet
offsetSet($offset, $value)
Definition
sessionlocalstorage.php:90
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\count
count()
Definition
sessionlocalstorage.php:107
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\getUniqueName
getUniqueName()
Definition
sessionlocalstorage.php:19
Bitrix\Main\Data\LocalStorage\SessionLocalStorage\setUniqueName
setUniqueName(string $uniqueName)
Definition
sessionlocalstorage.php:36
Bitrix\Main\Data\LocalStorage
Definition
sessionlocalstorage.php:2
modules
main
lib
data
localstorage
sessionlocalstorage.php
Создано системой
1.10.0