SessionManager

Class SessionManager

package

Ascmvc\Session

Methods

SessionManager constructor.

__construct(\swoole_http_request|null $request = null, \swoole_http_response|null $response = null, \Ascmvc\Session\Config|null $config = null) 

Arguments

$request

\swoole_http_request|null

$response

\swoole_http_response|null

$config

\Ascmvc\Session\Config|null

Returns the Config instance.

getConfig() : \Ascmvc\Session\Config|null

Response

\Ascmvc\Session\Config|null

Gets the Http instance.

getHttp() : \Ascmvc\Session\Http|null

Response

\Ascmvc\Session\Http|null

Gets the Session instance.

getSession() : \Ascmvc\Session\Session|null

Response

\Ascmvc\Session\Session|null

Gets the singleton SessionManager.

getSessionManager(\swoole_http_request|null $request = null, \swoole_http_response|null $response = null, \Ascmvc\Session\Config|null $config = null, boolean $reset = false) : \Ascmvc\Session\SessionManager|null|static
static

Arguments

$request

\swoole_http_request|null

$response

\swoole_http_response|null

$config

\Ascmvc\Session\Config|null

$reset

boolean

Response

\Ascmvc\Session\SessionManager|null|static

Checks the session flag.

isEnabled() : boolean

Response

boolean

Persists the session data in the cache storage.

persist() 

Sets the Config instance.

setConfig(\Ascmvc\Session\Config $config) : $this

Arguments

Response

$this

Starts the session.

start() : $this
Throws
\Exception

Response

$this

Properties

Contains the SessionManager instance.

sessionManager : \Ascmvc\Session\SessionManager
static

Contains the Swoole Request object.

request : \swoole_http_request|null
var

Type(s)

\swoole_http_request|null

Contains the Swoole Response object.

response : \swoole_http_response|null
var

Type(s)

\swoole_http_response|null

Contains the session Config object.

config : \Ascmvc\Session\Config|null
var

Type(s)

\Ascmvc\Session\Config|null

Contains the session flag.

enabled : boolean
var

Type(s)

boolean

Contains the session Http object.

http : \Ascmvc\Session\Http|null
var

Type(s)

\Ascmvc\Session\Http|null

Contains the Session object.

session : \Ascmvc\Session\Session|null
var

Type(s)

\Ascmvc\Session\Session|null