interface SessionHandlerInterface

SessionHandlerInterface

Provides forward compatibility with PHP 5.4

Extensive documentation can be found at php.net, see links:

@author Drak <drak@zikula.org>

Hierarchy

Expanded class hierarchy of SessionHandlerInterface

All classes that implement SessionHandlerInterface

See also

http://php.net/sessionhandlerinterface

http://php.net/session.customhandler

http://php.net/session-set-save-handler

2 string references to 'SessionHandlerInterface'
bootstrap.php in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/bootstrap.php
SessionHandlerProxyTest::setUp in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php, line 25

View source
interface SessionHandlerInterface {

  /**
   * Open session.
   *
   * @see http://php.net/sessionhandlerinterface.open
   *
   * @param string $savePath    Save path.
   * @param string $sessionName Session Name.
   *
   * @throws \RuntimeException If something goes wrong starting the session.
   *
   * @return boolean
   */
  public function open($savePath, $sessionName);

  /**
   * Close session.
   *
   * @see http://php.net/sessionhandlerinterface.close
   *
   * @return boolean
   */
  public function close();

  /**
   * Read session.
   *
   * @see http://php.net/sessionhandlerinterface.read
   *
   * @throws \RuntimeException On fatal error but not "record not found".
   *
   * @return string String as stored in persistent storage or empty string in all other cases.
   */
  public function read($sessionId);

  /**
   * Commit session to storage.
   *
   * @see http://php.net/sessionhandlerinterface.write
   *
   * @param string $sessionId Session ID.
   * @param string $data      Session serialized data to save.
   *
   * @return boolean
   */
  public function write($sessionId, $data);

  /**
   * Destroys this session.
   *
   * @see http://php.net/sessionhandlerinterface.destroy
   *
   * @param string $sessionId Session ID.
   *
   * @throws \RuntimeException On fatal error.
   *
   * @return boolean
   */
  public function destroy($sessionId);

  /**
   * Garbage collection for storage.
   *
   * @see http://php.net/sessionhandlerinterface.gc
   *
   * @param integer $lifetime Max lifetime in seconds to keep sessions stored.
   *
   * @throws \RuntimeException On fatal error.
   *
   * @return boolean
   */
  public function gc($lifetime);

}

Members

Namesort descending Modifiers Type Description Overrides
SessionHandlerInterface::close public function Close session.
SessionHandlerInterface::destroy public function Destroys this session.
SessionHandlerInterface::gc public function Garbage collection for storage.
SessionHandlerInterface::open public function Open session.
SessionHandlerInterface::read public function Read session.
SessionHandlerInterface::write public function Commit session to storage.