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
ezpSessionHandler Class Reference
Inheritance diagram for ezpSessionHandler:

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

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

## Public Attributes
| $userHasCookie

## Detailed Description

Definition at line 25 of file ezpsessionhandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

ezpSessionHandler::__construct | ( |  | $userHasCookie = `false` | ) |

__construct

Parameters

  bool | $userHasCookie |

Definition at line 32 of file ezpsessionhandler.php.

References $userHasCookie.

## Member Function Documentation

## ◆ cleanup()

ezpSessionHandler::cleanup | ( |  | ) |
| abstract

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

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony, ezpSessionHandlerPHP, and ezpSessionHandlerDB.

## ◆ close()

ezpSessionHandler::close | ( |  | ) |

Session close handler

Returns
  bool

Definition at line 83 of file ezpsessionhandler.php.

## ◆ count()

static ezpSessionHandler::count | ( |  | ) |
| static

Counts the number of session and returns it.

Returns
  int Returns -1 if handler does not support this.

Reimplemented in ezpSessionHandlerSymfony, and ezpSessionHandlerDB.

Definition at line 162 of file ezpsessionhandler.php.

## ◆ dbRequired()

static ezpSessionHandler::dbRequired | ( |  | ) |
| static

Signals that handler requires db instance

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony, and ezpSessionHandlerPHP.

Definition at line 183 of file ezpsessionhandler.php.

## ◆ deleteByUserIDs()

ezpSessionHandler::deleteByUserIDs | ( | array | $userIDArray | ) |
| abstract

Remove all session data for a specific user

Parameters

  array(int) | $userIDArray

Reimplemented in ezpSessionHandlerSymfony, ezpSessionHandlerPHP, and ezpSessionHandlerDB.

## ◆ destroy()

ezpSessionHandler::destroy | ( |  | $sessionId | ) |
| abstract

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

Parameters

  string | $sessionId |

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony, ezpSessionHandlerPHP, and ezpSessionHandlerDB.

## ◆ gc()

ezpSessionHandler::gc | ( |  | $maxLifeTime | ) |
| abstract

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

Parameters

  int | $maxLifeTime | In seconds

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony, ezpSessionHandlerPHP, and ezpSessionHandlerDB.

## ◆ hasBackendAccess()

static ezpSessionHandler::hasBackendAccess | ( |  | ) |
| static

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

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony, and ezpSessionHandlerPHP.

Definition at line 173 of file ezpsessionhandler.php.

## ◆ isConnected()

ezpSessionHandler::isConnected | ( |  | ) |

Checks if session handler is connected with backend.

Returns
  bool

Reimplemented in ezpSessionHandlerDB.

Definition at line 42 of file ezpsessionhandler.php.

## ◆ open()

ezpSessionHandler::open | ( |  | $savePath,
|  |  | $sessionName
| ) |  |

Session open handler

Parameters

  string | $savePath |
  string | $sessionName |

Returns
  bool

Definition at line 73 of file ezpsessionhandler.php.

## ◆ read()

ezpSessionHandler::read | ( |  | $sessionId | ) |
| abstract

Session read handler

Parameters

  string | $sessionId |

Returns
  string|false Binary session data

Reimplemented in ezpSessionHandlerSymfony, ezpSessionHandlerPHP, and ezpSessionHandlerDB.

## ◆ regenerate()

ezpSessionHandler::regenerate | ( |  | $updateBackendData = `true` | ) |
| abstract

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

Parameters

  bool | $updateBackendData | True if we want to keep session data with the new session id

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony, ezpSessionHandlerPHP, and ezpSessionHandlerDB.

## ◆ sessionStart()

ezpSessionHandler::sessionStart | ( |  | ) |

Starts the session. Override this method if you need to delegate session start to an external system (e.g. Symfony stack in eZ Publish 5)

Since
  5.0

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony.

Definition at line 195 of file ezpsessionhandler.php.

## ◆ setSaveHandler()

ezpSessionHandler::setSaveHandler | ( |  | ) |

Set it self as save handler

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony, and ezpSessionHandlerPHP.

Definition at line 52 of file ezpsessionhandler.php.

## ◆ write()

ezpSessionHandler::write | ( |  | $sessionId,
|  |  | $sessionData
| ) |  |
| abstract

Session write handler

Parameters

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

Returns
  bool

Reimplemented in ezpSessionHandlerSymfony, ezpSessionHandlerPHP, and ezpSessionHandlerDB.

## Member Data Documentation

## ◆ $userHasCookie

ezpSessionHandler::$userHasCookie

Definition at line 200 of file ezpsessionhandler.php.

Referenced by __construct().

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

- ezpsessionhandler.php

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