Extends
lithium\core\Object
Checks if a value has been set in the session.
Parameters
- string $key Key of the entry to be checked.
- array $options Options array. Not used for this adapter method.
Returns
closure Function returning boolean `true` if the key exists, `false` otherwise.Source
public static function check($key, array $options = array()) {
if (!static::isStarted() && !static::_start()) {
throw new RuntimeException("Could not start session.");
}
return function($self, $params) {
return Set::check($_SESSION, $params['key']);
};
}