Documentation

SessionLocalStorage

Class with methods for local session storage.

Method Description Available from version
\Bitrix\Main\Data\LocalStorage\SessionLocalStorage::getData(): array
Returns complete array with data available in the container.
\Bitrix\Main\Data\LocalStorage\SessionLocalStorage::setData(array $data)
Sets array with data, fully overwriting previous value. Parameter:
  • $data {array} - Array with data.
\Bitrix\Main\Data\LocalStorage\SessionLocalStorage::get(string $key): mixed
Returns data by key. Parameter:
  • $key {string} - Key, used for searching in a specific container SessionLocalStorage, inside $data.
\Bitrix\Main\Data\LocalStorage\SessionLocalStorage::set(string $key, $value): self
Sets value by the key in container. Parameters:
  • $key {string} - key, that writes value in a specific container SessionLocalStorage, inside $data.
  • $value {mixed} - value.
\Bitrix\Main\Data\LocalStorage\SessionLocalStorage::clear(): void
Clears current values.


© «Bitrix24», 2001-2024
Up