PHP Class AppserverIo\Appserver\ServletEngine\Http\SessionWrapper

Inheritance: extends AppserverIo\Psr\Servlet\Http\HttpSessionWrapper
Mostra file Open project: appserver-io/appserver Class Usage Examples

Protected Properties

Property Type Description
$request AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface The request instance we're working on.

Public Methods

Method Description
close ( ) : void Explicitly writes and closes the session
destroy ( string $reason ) : void Explicitly destroys all session data and adds a cookie to the response that invalidates the session in the browser.
getRequest ( ) : AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface Returns the request instance we're working on.
getResponse ( ) : AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface Returns the response instance we're working on.
injectRequest ( AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface $request ) : void Injects the request instance.
removeData ( string $key ) : void Removes the session data entry $key from the session.
renewId ( ) : string Generates and propagates a new session ID and transfers all existing data to the new session.
shutdownObject ( ) : void Shuts down this session
start ( ) : void Creates and returns the session cookie to be added to the response.

Method Details

close() public method

Explicitly writes and closes the session
public close ( ) : void
return void

destroy() public method

Explicitly destroys all session data and adds a cookie to the response that invalidates the session in the browser.
public destroy ( string $reason ) : void
$reason string The reason why the session has been destroyed
return void

getRequest() public method

Returns the request instance we're working on.
public getRequest ( ) : AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface
return AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface

getResponse() public method

Returns the response instance we're working on.
public getResponse ( ) : AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface
return AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface

injectRequest() public method

Injects the request instance.
public injectRequest ( AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface $request ) : void
$request AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface The request instance we're working on
return void

removeData() public method

Removes the session data entry $key from the session.
public removeData ( string $key ) : void
$key string Entry identifier of the session data to remove
return void

renewId() public method

Generates and propagates a new session ID and transfers all existing data to the new session.
public renewId ( ) : string
return string The new session ID

shutdownObject() public method

This method must not be called manually – it is invoked by Flow's object management.
public shutdownObject ( ) : void
return void

start() public method

Creates and returns the session cookie to be added to the response.
public start ( ) : void
return void

Property Details

$request protected_oe property

The request instance we're working on.
protected HttpServletRequestInterface,AppserverIo\Psr\Servlet\Http $request
return AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface