lib/ezsession/classes/ezpsessionhandlerphp.php

Show: inherited
Table of Contents

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

\ezpSessionHandlerPHP

Package: lib\ezsession

PHP session handler class Does not register it self as opposed to most other handler, as the point is to let PHP handle most things

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  

Methods

methodpublic__construct( bool $userHasCookie = false ) : void
inherited

__construct

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

reimp (not used in this handler)

Returns
Type Description
bool
methodpublicclose( ) : bool
inherited

Session close handler

Inherited from: \ezpSessionHandler::close()
Returns
Type Description
bool
methodpubliccount( ) : int
staticinherited

Counts the number of session and returns it.

Inherited from: \ezpSessionHandler::count()
Returns
Type Description
int Returns -1 if handler does not support this.
methodpublicdbRequired( ) : bool
static

reimp (this handler does not use db)

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

reimp (not used in this handler)

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

reimp (not used in this handler)

So callbacks on this function is not called, this is a known limitation. Either make sure your data does not depend on session id, or make sure it is cleanup in session_gc.php (cronjob).

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

reimp (not used in this handler)

Parameters
Name Type Description
$maxLifeTime int

In seconds

Returns
Type Description
bool
methodpublichasBackendAccess( ) : bool
static

reimp (this handler does not use db)

Returns
Type Description
bool
methodpublicisConnected( ) : bool
inherited

Checks if session handler is connected with backend.

Inherited from: \ezpSessionHandler::isConnected()
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

reimp (not used in this handler)

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

reimp (Only uses php and callbacks)

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

reimp (Does nothing, lets php handle sessions) Does set gc_maxlifetime to SessionTimeout to make sure timeout works like DB handler

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

reimp (not used in this handler)

Parameters
Name Type Description
$sessionId string
$sessionData string

Binary session data

Returns
Type Description
bool
Documentation was generated by DocBlox 0.18.1.