lithium\storage\session\adapter\Php::check PHP Method

check() public method

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.
return Closure Function returning boolean `true` if the key exists, `false` otherwise.
    public function check($key, array $options = array())
    {
        if (!$this->isStarted() && !$this->_start()) {
            throw new RuntimeException('Could not start session.');
        }
        return function ($class, $params) {
            return Set::check($_SESSION, $params['key']);
        };
    }