lib/ezsession/classes/ezpsessionhandler.php

Show: inherited
Table of Contents

File containing abstract 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  

\ezpSessionHandler

Package: lib\ezsession

Abstract session handler class to extend

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.

Children
\ezpSessionHandlerPHP
\ezpSessionHandlerDB
Abstract
 
Since
4.4  

Methods

methodpublic__construct( bool $userHasCookie = false ) : void

__construct

Parameters
Name Type Description
$userHasCookie bool
methodpubliccleanup( ) : bool
abstract

Remove all session data Callback: "cleanup_[pre|post]" eZDB $db

Returns
Type Description
bool
methodpublicclose( ) : bool

Session close handler

Returns
Type Description
bool
methodpubliccount( ) : int
static

Counts the number of session and returns it.

Returns
Type Description
int Returns -1 if handler does not support this.
methodpublicdbRequired( ) : bool
static

Signals that handler requires db instance

Returns
Type Description
bool
methodpublicdeleteByUserIDs( \array(int) $userIDArray ) : void
abstract

Remove all session data for a specific user

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

Session destroy handler Callback: "destroy_[pre|post]" eZDB $db string $sessionId string $escKey

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

Session gc (garbageCollector) handler Callback: "gc_[pre|post]" eZDB $db int $maxLifeTime

Parameters
Name Type Description
$maxLifeTime int

In seconds

Returns
Type Description
bool
methodpublichasBackendAccess( ) : bool
static

Signals that handler has direct access to backend, thus is cable of supporting features like gc, cleanup, delete & count.

Returns
Type Description
bool
methodpublicisConnected( ) : bool

Checks if session handler is connected with backend.

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

Session open handler

Parameters
Name Type Description
$savePath string
$sessionName string
Returns
Type Description
bool
methodpublicread( string $sessionId ) : string | false
abstract

Session read handler

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

Regenerate session id Callback (when $updateBackendData is true): "regenerate_[pre|post]" eZDB $db string $escNewKey string $escOldKey int $escUserID

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

Set it self as save handler

Returns
Type Description
bool
methodpublicwrite( string $sessionId, string $sessionData ) : bool
abstract

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.