\Pluf\MiddlewareSession

Allow a session object in the request.

Summary

Methods
Properties
Constants
process_request()
process_response()
_encodeData()
_decodeData()
processContext()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

process_request()

process_request(\Pluf_HTTP_Request  $request) : boolean

Process the request.

FIXME: We should logout everybody when the session table is emptied.

Parameters

\Pluf_HTTP_Request $request

Returns

boolean —

false

process_response()

process_response(\Pluf_HTTP_Request  $request, \Pluf_HTTP_Response  $response) 

Process the response of a view.

If the session has been modified save it into the database. Add the session cookie to the response.

Parameters

\Pluf_HTTP_Request $request
\Pluf_HTTP_Response $response

_encodeData()

_encodeData(  $data) : string

Encode the cookie data and create a check with the secret key.

Parameters

$data

Returns

string —

Encoded data ready for the cookie

_decodeData()

_decodeData(  $encoded_data) : mixed

Decode the data and check that the data have not been tampered.

If the data have been tampered an exception is raised.

Parameters

$encoded_data

Returns

mixed —

Decoded data

processContext()

processContext(  $signal,   $params) 

Parameters

$signal
$params