Methods
Session constructor.
__construct(\Ascmvc\Session\SessionManager $sessionManager, \Psr\Cache\CacheItemPoolInterface $sessionCachePool)
Arguments
$sessionCachePool
\Psr\Cache\CacheItemPoolInterface
Session destructor.
__destruct()
Creates a new session.
createNewSession()
Generates a new session ID.
generateSessionId() : boolean|string
Gets the session element of data by name.
get(string|null $name = null) : array|mixed|null
Arguments
Response
array|mixed|null
Gets the session id.
getSessionId() : string|null
Reads the data from the storage.
readData() : boolean
Saves the data in the storage.
saveData() : boolean
Sets the session element of data by name.
set(string $name, $value) : $this
Sets the session id.
setSessionId( $sessionId) : null|string
Arguments
Response
null|string
Properties
Contains a SessionManager instance.
sessionManager : \Ascmvc\Session\SessionManager
Contains the session Config object.
config : \Ascmvc\Session\Config
Contains the session Http object.
http : \Ascmvc\Session\Http|null
Contains the session id string.
sessionId : string|null
Contains the session's data.
data : array
Contains a PSR-6 CacheItemPoolInterface instance.
sessionCachePool : \Psr\Cache\CacheItemPoolInterface|null
Type(s)
\Psr\Cache\CacheItemPoolInterface|null
Contains the session's cache item.
sessionCacheItem : \Psr\Cache\CacheItemInterface|null
Type(s)
\Psr\Cache\CacheItemInterface|null