lithium\storage\session\adapter\Memory::read()
Read a value from the session.
Parameters
-
null|string
$key
Key of the entry to be read. If no key is passed, all current session data is returned.
-
array
$options
Options array. Not used for this adapter method.
Returns
\ClosureFunction returning data in the session if successful, false
otherwise.
Source
public function read($key = null, array $options = []) {
return function($params) {
if (!$params['key']) {
return $this->_session;
}
return isset($this->_session[$params['key']]) ? $this->_session[$params['key']] : null;
};
}