Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ezpSessionHandlerDB Class Reference
Inheritance diagram for ezpSessionHandlerDB:

## Public Member Functions
| isConnected ()
| read ( $sessionId)
| write ( $sessionId, $sessionData)
| destroy ( $sessionId)
| regenerate ( $updateBackendData=true)
| gc ( $maxLifeTime)
| cleanup ()
| deleteByUserIDs (array $userIDArray)
Public Member Functions inherited from ezpSessionHandler
| __construct ( $userHasCookie=false)
| setSaveHandler ()
| open ( $savePath, $sessionName)
| close ()
| sessionStart ()

## Static Public Member Functions
static | count ()
Static Public Member Functions inherited from ezpSessionHandler
static | hasBackendAccess ()
static | dbRequired ()

## Public Attributes
const | GC_TIMEOUT_MARGIN = 5
const | GC_MAX_EXECUTION_TIME = 300
const | GC_MAX_EXECUTION_TIME_CLI = 3000
| $gcSessionsPrIteration = 50
Public Attributes inherited from ezpSessionHandler
| $userHasCookie

## Detailed Description

Definition at line 18 of file ezpsessionhandlerdb.php.

## Member Function Documentation

## ◆ cleanup()

ezpSessionHandlerDB::cleanup | ( |  | ) |

Remove all session data (Truncate table)

Returns
  bool

Reimplemented from ezpSessionHandler.

Definition at line 244 of file ezpsessionhandlerdb.php.

References $db, ezpEvent\getInstance(), and eZSession\triggerCallback().

## ◆ count()

static ezpSessionHandlerDB::count | ( |  | ) |
| static

Counts the number of session and returns it.

Returns
  int|null Returns null if handler does not support this.

Reimplemented from ezpSessionHandler.

Definition at line 278 of file ezpsessionhandlerdb.php.

References $db, and $rows.

Referenced by read(), and write().

## ◆ deleteByUserIDs()

ezpSessionHandlerDB::deleteByUserIDs | ( | array | $userIDArray | ) |

Remove all session data for a specific user

Parameters

  array(int) | $userIDArray

Reimplemented from ezpSessionHandler.

Definition at line 261 of file ezpsessionhandlerdb.php.

References $db, $row, $rows, and destroy().

## ◆ destroy()

ezpSessionHandlerDB::destroy | ( |  | $sessionId | ) |

Session destroy handler

Parameters

  string | $sessionId |

Returns
  bool

Reimplemented from ezpSessionHandler.

Definition at line 136 of file ezpsessionhandlerdb.php.

References $db, ezpEvent\getInstance(), and eZSession\triggerCallback().

Referenced by deleteByUserIDs().

## ◆ gc()

ezpSessionHandlerDB::gc | ( |  | $maxLifeTime | ) |

Session gc (garbageCollector) handler

Parameters

  int | $maxLifeTime |

Returns
  bool

Reimplemented from ezpSessionHandler.

Definition at line 191 of file ezpsessionhandlerdb.php.

References $db, $rows, $startTime, $stopTime, GC_MAX_EXECUTION_TIME, GC_MAX_EXECUTION_TIME_CLI, ezpEvent\getInstance(), and eZSession\triggerCallback().

## ◆ isConnected()

ezpSessionHandlerDB::isConnected | ( |  | ) |

Checks if session handler is connected with backend.

Returns
  bool

Reimplemented from ezpSessionHandler.

Definition at line 42 of file ezpsessionhandlerdb.php.

References $db.

## ◆ read()

ezpSessionHandlerDB::read | ( |  | $sessionId | ) |

Session read handler

Parameters

  string | $sessionId |

Returns
  string|false Binary session data

Reimplemented from ezpSessionHandler.

Definition at line 54 of file ezpsessionhandlerdb.php.

References $db, $ini, count(), and eZSession\setUserID().

## ◆ regenerate()

ezpSessionHandlerDB::regenerate | ( |  | $updateBackendData = `true` | ) |

Regenerate session id

Parameters

  bool | $updateBackendData | (true if we want to keep session data with the new session id)

Returns
  bool

Reimplemented from ezpSessionHandler.

Definition at line 156 of file ezpsessionhandlerdb.php.

References $db, ezpEvent\getInstance(), eZSession\triggerCallback(), and eZSession\userID().

## ◆ write()

ezpSessionHandlerDB::write | ( |  | $sessionId,
|  |  | $sessionData
| ) |  |

Session write handler

Parameters

  string | $sessionId |
  string | $sessionData | Binary session data

Returns
  bool

Reimplemented from ezpSessionHandler.

Definition at line 92 of file ezpsessionhandlerdb.php.

References $db, $ini, $ret, $userID, count(), and eZSession\userID().

## Member Data Documentation

## ◆ $gcSessionsPrIteration

ezpSessionHandlerDB::$gcSessionsPrIteration = 50

Definition at line 35 of file ezpsessionhandlerdb.php.

## ◆ GC_MAX_EXECUTION_TIME

const ezpSessionHandlerDB::GC_MAX_EXECUTION_TIME = 300

Definition at line 24 of file ezpsessionhandlerdb.php.

Referenced by gc().

## ◆ GC_MAX_EXECUTION_TIME_CLI

const ezpSessionHandlerDB::GC_MAX_EXECUTION_TIME_CLI = 3000

Definition at line 27 of file ezpsessionhandlerdb.php.

Referenced by gc().

## ◆ GC_TIMEOUT_MARGIN

const ezpSessionHandlerDB::GC_TIMEOUT_MARGIN = 5

Definition at line 21 of file ezpsessionhandlerdb.php.

The documentation for this class was generated from the following file:

- ezpsessionhandlerdb.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.