Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
temporarystorage.php
1
<?php
2
3
namespace
Bitrix\Main\UserField\Internal
;
4
8
class
TemporaryStorage
9
{
10
protected
$data
;
11
16
public
function
getIdByPrimary
($primary)
17
{
18
if
(is_array($primary))
19
{
20
return
$primary[
'ID'
];
21
}
22
23
return
$primary;
24
}
25
26
public
function
saveData
($primary, array
$data
=
null
)
27
{
28
$this->data[$this->
getIdByPrimary
($primary)] =
$data
;
29
}
30
31
public
function
getData
($primary): ?array
32
{
33
$primary = $this->
getIdByPrimary
($primary);
34
if
(isset($this->data[$primary]) && !empty($this->data[$primary]))
35
{
36
$oldData = $this->data[$primary];
37
unset($this->data[$primary]);
38
39
return
$oldData;
40
}
41
42
return
null
;
43
}
44
}
Bitrix\Main\UserField\Internal\TemporaryStorage
Definition
temporarystorage.php:9
Bitrix\Main\UserField\Internal\TemporaryStorage\getIdByPrimary
getIdByPrimary($primary)
Definition
temporarystorage.php:16
Bitrix\Main\UserField\Internal\TemporaryStorage\saveData
saveData($primary, array $data=null)
Definition
temporarystorage.php:26
Bitrix\Main\UserField\Internal\TemporaryStorage\$data
$data
Definition
temporarystorage.php:10
Bitrix\Main\UserField\Internal\TemporaryStorage\getData
getData($primary)
Definition
temporarystorage.php:31
Bitrix\Main\UserField\Internal
Definition
item.php:3
modules
main
lib
userfield
internal
temporarystorage.php
Создано системой
1.10.0