PHP Класс lithium\storage\session\adapter\Memory

Наследование: extends lithium\core\Object
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_session Holds the array that corresponds to session keys & values.

Открытые методы

Метод Описание
check ( string $key, array $options = [] ) : Closure Checks if a value has been set in the session.
clear ( array $options = [] ) : Closure Clears all keys from the session.
delete ( string $key, array $options = [] ) : Closure Delete value from the session
enabled ( ) : boolean This adapter is always enabled, as it has no external dependencies.
isStarted ( ) : boolean The memory adapter session is always "on".
key ( ) : string Obtain the session key.
read ( null | string $key = null, array $options = [] ) : Closure Read a value from the session.
write ( string $key, mixed $value, array $options = [] ) : Closure Write a value to the session.

Описание методов

check() публичный Метод

Checks if a value has been set in the session.
public check ( string $key, array $options = [] ) : Closure
$key string Key of the entry to be checked.
$options array Options array. Not used for this adapter method.
Результат Closure Function returning boolean `true` if the key exists, `false` otherwise.

clear() публичный Метод

Clears all keys from the session.
public clear ( array $options = [] ) : Closure
$options array Options array. Not used for this adapter method.
Результат Closure Function that clears the session

delete() публичный Метод

Delete value from the session
public delete ( string $key, array $options = [] ) : Closure
$key string The key to be deleted
$options array Options array. Not used for this adapter method.
Результат Closure Function returning boolean `true` on successful delete, `false` otherwise

enabled() публичный статический Метод

This adapter is always enabled, as it has no external dependencies.
public static enabled ( ) : boolean
Результат boolean True

isStarted() публичный Метод

The memory adapter session is always "on".
public isStarted ( ) : boolean
Результат boolean True.

key() публичный статический Метод

For this adapter, it is a UUID.
public static key ( ) : string
Результат string UUID.

read() публичный Метод

Read a value from the session.
public read ( null | string $key = null, array $options = [] ) : Closure
$key null | string Key of the entry to be read. If no key is passed, all current session data is returned.
$options array Options array. Not used for this adapter method.
Результат Closure Function returning data in the session if successful, `false` otherwise.

write() публичный Метод

Write a value to the session.
public write ( string $key, mixed $value, array $options = [] ) : Closure
$key string Key of the item to be stored.
$value mixed The value to be stored.
$options array Options array. Not used for this adapter method.
Результат Closure Function returning boolean `true` on successful write, `false` otherwise.

Описание свойств

$_session публичное свойство

Holds the array that corresponds to session keys & values.
public $_session