PHP Class AppserverIo\Appserver\ServletEngine\Session\AbstractSessionHandler

Inheritance: implements AppserverIo\Appserver\ServletEngine\Session\SessionHandlerInterface
Afficher le fichier Open project: appserver-io/appserver

Protected Properties

Свойство Type Description
$sessionMarshaller AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface The session marshaller instance.
$sessionSettings AppserverIo\Appserver\ServletEngine\SessionSettingsInterface The settings for the session handling.

Méthodes publiques

Méthode Description
__construct ( string $sessionMarshallerType = FilesystemSessionHandler::DEFAULT_SESSION_MARSHALLER_TYPE ) Initializes the session handler with the configured params.
getSessionMarshaller ( ) : AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface Returns the session marshaller.
getSessionSettings ( ) : AppserverIo\Appserver\ServletEngine\SessionSettingsInterface Returns the session settings.
injectSessionMarshaller ( AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface $sessionMarshaller ) : void Injects the session marshaller.
injectSessionSettings ( AppserverIo\Appserver\ServletEngine\SessionSettingsInterface $sessionSettings ) : void Injects the session settings.

Méthodes protégées

Méthode Description
marshall ( AppserverIo\Psr\Servlet\ServletSessionInterface $servletSession ) : string Transforms the passed session instance into a JSON encoded string. If the data contains objects, each of them will be serialized before store them to the persistence layer.
unmarshall ( string $marshalled ) : AppserverIo\Psr\Servlet\ServletSessionInterface Initializes the session instance from the passed JSON string. If the encoded data contains objects, they will be unserialized before reattached to the session instance.

Method Details

__construct() public méthode

Initializes the session handler with the configured params.
public __construct ( string $sessionMarshallerType = FilesystemSessionHandler::DEFAULT_SESSION_MARSHALLER_TYPE )
$sessionMarshallerType string The session marshaller type to use

getSessionMarshaller() public méthode

Returns the session marshaller.
public getSessionMarshaller ( ) : AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface
Résultat AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface The session marshaller

getSessionSettings() public méthode

Returns the session settings.
public getSessionSettings ( ) : AppserverIo\Appserver\ServletEngine\SessionSettingsInterface
Résultat AppserverIo\Appserver\ServletEngine\SessionSettingsInterface The session settings

injectSessionMarshaller() public méthode

Injects the session marshaller.
public injectSessionMarshaller ( AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface $sessionMarshaller ) : void
$sessionMarshaller AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface The session marshaller instance
Résultat void

injectSessionSettings() public méthode

Injects the session settings.
public injectSessionSettings ( AppserverIo\Appserver\ServletEngine\SessionSettingsInterface $sessionSettings ) : void
$sessionSettings AppserverIo\Appserver\ServletEngine\SessionSettingsInterface Settings for the session handling
Résultat void

marshall() protected méthode

Transforms the passed session instance into a JSON encoded string. If the data contains objects, each of them will be serialized before store them to the persistence layer.
protected marshall ( AppserverIo\Psr\Servlet\ServletSessionInterface $servletSession ) : string
$servletSession AppserverIo\Psr\Servlet\ServletSessionInterface The servlet session to be transformed
Résultat string The marshalled servlet session representation

unmarshall() protected méthode

Initializes the session instance from the passed JSON string. If the encoded data contains objects, they will be unserialized before reattached to the session instance.
protected unmarshall ( string $marshalled ) : AppserverIo\Psr\Servlet\ServletSessionInterface
$marshalled string The marshaled session representation
Résultat AppserverIo\Psr\Servlet\ServletSessionInterface The un-marshaled servlet session instance

Property Details

$sessionMarshaller protected_oe property

The session marshaller instance.
protected SessionMarshallerInterface,AppserverIo\Appserver\ServletEngine $sessionMarshaller
Résultat AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface

$sessionSettings protected_oe property

The settings for the session handling.
protected SessionSettingsInterface,AppserverIo\Appserver\ServletEngine $sessionSettings
Résultat AppserverIo\Appserver\ServletEngine\SessionSettingsInterface