Alpha ZealPHP is early-stage and under active development. APIs may change between minor versions until v1.0. Feedback and bug reports welcome on GitHub.
API Index — Namespaces, Packages, Reports, Indices

SessionManager
in package

Table of Contents

Properties

$g  : RequestContext
$idGenerator  : callable
$middleware  : callable
$useCookies  : bool
$useOnlyCookies  : bool

Methods

__construct()  : mixed
Inject dependencies
__invoke()  : void
Delegate execution to the underlying middleware wrapping it into the session start/stop calls

Properties

Methods

__construct()

Inject dependencies

public __construct(callable $middleware[, callable $idGenerator = 'session_create_id' ][, bool|null $useCookies = null ][, bool|null $useOnlyCookies = null ]) : mixed
Parameters
$middleware : callable

function (\Swoole\Http\Request $request, \Swoole\Http\Response $response)

$idGenerator : callable = 'session_create_id'
$useCookies : bool|null = null
$useOnlyCookies : bool|null = null

__invoke()

Delegate execution to the underlying middleware wrapping it into the session start/stop calls

public __invoke(Request $request, Response $response) : void
Parameters
$request : Request
$response : Response
On this page