Zend\Session\SessionManager
Session ManagerInterface implementation utilizing ext/session
Synopsis
class SessionManager
extends AbstractManager
{
- // members
- protected array $defaultDestroyOptions;
- protected string $name;
- protected EventManagerInterface $validatorChain;
- // Inherited members from AbstractManager
- protected ConfigInterface $config;
- protected string $defaultConfigClass;
- protected StorageInterface $storage;
- protected string $defaultStorageClass;
- protected SaveHandlerInterface $saveHandler;
- // methods
- public void __construct()
- public bool sessionExists()
- public void start()
- public void destroy()
- public void writeClose()
- public SessionManager setName()
- public string getName()
- public SessionManager setId()
- public string getId()
- public SessionManager regenerateId()
- public SessionManager rememberMe()
- public SessionManager forgetMe()
- public SessionManager setValidatorChain()
- public EventManagerInterface getValidatorChain()
- public bool isValid()
- public void expireSessionCookie()
- protected void setSessionCookieLifetime()
- protected bool registerSaveHandler()
- // Inherited methods from AbstractManager
- public void __construct()
- public AbstractManager setConfig()
- public ConfigInterface getConfig()
- public AbstractManager setStorage()
- public StorageInterface getStorage()
- public AbstractManager setSaveHandler()
- public SaveHandlerInterface getSaveHandler()
Hierarchy
Extends
Members
protected
- $config — Zend\Session\Config\ConfigInterface
- $defaultConfigClass
—
string
Default configuration class to use when no configuration provided - $defaultDestroyOptions
—
array
Default options when a call to {@link destroy()} is made - send_expire_cookie: whether or not to send a cookie expiring the current session cookie - clear_storage: whether or not to empty the storage object of any stored values - $defaultStorageClass
—
string
Default storage class to use when no storage provided - $name — string
- $saveHandler — Zend\Session\SaveHandler\SaveHandlerInterface
- $storage — Zend\Session\Storage\StorageInterface
- $validatorChain — Zend\EventManager\EventManagerInterface
Methods
protected
- registerSaveHandler() — Register Save Handler with ext/session
- setSessionCookieLifetime() — Set the session cookie lifetime
public
- __construct() — Constructor
- destroy() — Destroy/end a session
- expireSessionCookie() — Expire the session cookie
- forgetMe() — Set a 0s TTL for the session cookie
- getId() — Get session ID
- getName() — Get session name
- getValidatorChain() — Get the validator chain to use when validating a session
- isValid() — Is this session valid?
- regenerateId() — Regenerate id
- rememberMe() — Set the TTL (in seconds) for the session cookie expiry
- sessionExists() — Does a session exist and is it currently active?
- setId() — Set session ID
- setName() — Attempt to set the session name
- setValidatorChain() — Set the validator chain to use when validating a session
- start() — Start session
- writeClose() — Write session to save handler and close
Inherited from Zend\Session\AbstractManager
public
- getConfig() — Retrieve configuration object
- getSaveHandler() — Get SaveHandler Object
- getStorage() — Retrieve storage object
- setConfig() — Set configuration object
- setSaveHandler() — Set session save handler object
- setStorage() — Set session storage object