lib/ezsession/classes/ezpsessionhandlerdb.php
File containing DB session handler
- Copyright
- Copyright (C) 1999-2010 eZ Systems AS. All rights reserved.
- License
- GNU General Public License v2.0
- Package
- lib
- Version
- 4.4.0
\ezpSessionHandlerDB
Package: lib\ezsession
DB session handler class
CALLBACKS: destroy, gc, regenerate & cleanup functions MUST implement callbacks. Definition is documented in functions on this class, examples can be found in the handlers and examples of use can be sessin in ezsession.php class doc section.
- Parent(s)
- \ezpSessionHandler
- Since
- 4.4
Constants
Properties
Methods


__construct(
bool $userHasCookie
=
false
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$userHasCookie | bool |


count(
)
:
int | null
static
Counts the number of session and returns it.
Returns
Type | Description |
---|---|
int | null | Returns null if handler does not support this. |


deleteByUserIDs(
\array(int) $userIDArray
)
:
void
Remove all session data for a specific user
Parameters
Name | Type | Description |
---|---|---|
$userIDArray | \array(int) |


destroy(
\$sessionId $sessionId
)
:
bool
Session destroy handler
Parameters
Returns
Name | Type | Description |
---|---|---|
$sessionId | \$sessionId | string |
Type | Description |
---|---|
bool |


gc(
\$maxLifeTime $maxLifeTime
)
:
bool
Session gc (garbageCollector) handler
Parameters
Returns
Name | Type | Description |
---|---|---|
$maxLifeTime | \$maxLifeTime | int |
Type | Description |
---|---|
bool |


hasBackendAccess(
)
:
bool
staticinherited
Signals that handler has direct access to backend, thus is cable of supporting features like gc, cleanup, delete & count.
Inherited from: \ezpSessionHandler::hasBackendAccess()
Returns
Type | Description |
---|---|
bool |


isConnected(
)
:
bool
Checks if session handler is connected with backend.
Returns
Type | Description |
---|---|
bool |


open(
string $savePath, string $sessionName
)
:
bool
Parameters
Returns
Name | Type | Description |
---|---|---|
$savePath | string | |
$sessionName | string |
Type | Description |
---|---|
bool |


read(
\$sessionId $sessionId
)
:
string | false
Session read handler
Parameters
Returns
Name | Type | Description |
---|---|---|
$sessionId | \$sessionId | string |
Type | Description |
---|---|
string | false | Binary session data |


regenerate(
\$updateBackendData $updateBackendData
=
true
)
:
bool
Regenerate session id
Parameters
Returns
Name | Type | Description |
---|---|---|
$updateBackendData | \$updateBackendData | bool (true if we want to keep session data with the new session id) |
Type | Description |
---|---|
bool |