lithium\storage\session\adapter\Php::write PHP Метод

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.
    public function write($key, $value, array $options = array())
    {
        if (!$this->isStarted() && !$this->_start()) {
            throw new RuntimeException('Could not start session.');
        }
        $self = $this;
        return function ($class, $params) use($self) {
            return $self->overwrite($_SESSION, Set::insert($_SESSION, $params['key'], $params['value']));
        };
    }