lib/ezsession/classes/ezpsessionhandlerdb.php

Show: inherited
Table of Contents

File containing DB session handler

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
lib  
Version
4.6.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

Constant  GC_TIMEOUT_MARGIN = 5
Constant  GC_MAX_EXECUTION_TIME = 300
Constant  GC_MAX_EXECUTION_TIME_CLI = 3000

Properties

Propertypublicint|false  $gcSessionsPrIteration= '50'

Specifies how many sessions should be deleted pr iteration when garbage collecting sessions (to avoid sql calls that lock db)

Default value50Details
Type
int | false

Methods

methodpublic__construct( bool $userHasCookie = false ) : void
inherited

__construct

Inherited from: \ezpSessionHandler::__construct()
Parameters
Name Type Description
$userHasCookie bool
methodpubliccleanup( ) : bool

Remove all session data (Truncate table)

Returns
Type Description
bool
methodpublicclose( ) : bool
inherited

Session close handler

Inherited from: \ezpSessionHandler::close()
Returns
Type Description
bool
methodpubliccount( ) : int | null
static

Counts the number of session and returns it.

Returns
Type Description
int | null Returns null if handler does not support this.
methodpublicdbRequired( ) : bool
staticinherited

Signals that handler requires db instance

Inherited from: \ezpSessionHandler::dbRequired()
Returns
Type Description
bool
methodpublicdeleteByUserIDs( \array(int) $userIDArray ) : void

Remove all session data for a specific user

Parameters
Name Type Description
$userIDArray \array(int)
methodpublicdestroy( string $sessionId ) : bool

Session destroy handler

Parameters
Name Type Description
$sessionId string
Returns
Type Description
bool
methodpublicgc( int $maxLifeTime ) : bool

Session gc (garbageCollector) handler

Parameters
Name Type Description
$maxLifeTime int
Returns
Type Description
bool
methodpublichasBackendAccess( ) : 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
methodpublicisConnected( ) : bool

Checks if session handler is connected with backend.

Returns
Type Description
bool
methodpublicopen( string $savePath, string $sessionName ) : bool
inherited

Session open handler

Inherited from: \ezpSessionHandler::open()
Parameters
Name Type Description
$savePath string
$sessionName string
Returns
Type Description
bool
methodpublicread( string $sessionId ) : string | false

Session read handler

Parameters
Name Type Description
$sessionId string
Returns
Type Description
string | false Binary session data
methodpublicregenerate( bool $updateBackendData = true ) : bool

Regenerate session id

Parameters
Name Type Description
$updateBackendData bool

(true if we want to keep session data with the new session id)

Returns
Type Description
bool
methodpublicsetSaveHandler( ) : bool
inherited

Set it self as save handler

Inherited from: \ezpSessionHandler::setSaveHandler()
Returns
Type Description
bool
methodpublicwrite( string $sessionId, string $sessionData ) : bool

Session write handler

Parameters
Name Type Description
$sessionId string
$sessionData string

Binary session data

Returns
Type Description
bool
Documentation was generated by DocBlox 0.18.1.