PHP 클래스 Horde_SessionHandler, horde

Copyright 2002-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
저자: Michael Slusarz ([email protected])
파일 보기 프로젝트 열기: horde/horde

공개 프로퍼티들

프로퍼티 타입 설명
$changed boolean If true, indicates the session data has changed.

보호된 프로퍼티들

프로퍼티 타입 설명
$_connected boolean Has a connection been made to the backend?
$_logger Horde_Log_Logger A logger instance.
$_params array Configuration parameters.
$_sig string Initial session data signature.
$_storage Horde_SessionHandler_Storage The storage object.

공개 메소드들

메소드 설명
__construct ( Horde_SessionHandler_Storage $storage, array $params = [] ) Constructor.
__destruct ( ) Destructor.
close ( ) : boolean Close the backend.
destroy ( string $id ) : boolean Destroy the data for a particular session identifier in the backend.
gc ( integer $maxlifetime = 300 ) : boolean Garbage collect stale sessions from the backend.
getSessionIDs ( ) : array Get a list of the valid session identifiers.
getSessionsInfo ( ) : array Returns a list of authenticated users and data about their session.
open ( string $save_path = null, string $session_name = null ) : boolean Open the backend.
read ( string $id ) : string Read the data for a particular session identifier from the backend.
write ( string $id, string $session_data ) : boolean Write session data to the backend.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Horde_SessionHandler_Storage $storage, array $params = [] )
$storage Horde_SessionHandler_Storage The storage object.
$params array Configuration parameters:
  - logger: (Horde_Log_Logger) A logger instance.
            DEFAULT: No logging
  - no_md5: (boolean) If true, does not do MD5 signatures of the
            session to determine if the session has changed (calling
            code is responsible for marking $changed as true when the
            session data has changed).
            DEFAULT: false
  - noset: (boolean) If true, don't set the save handler.
           DEFAULT: false
  - parse: (callback) A callback function that parses session
           information into an array. Is passed the raw session data
           as the only argument; expects either false or an array of
           session data as a return.
           DEFAULT: No

__destruct() 공개 메소드

Destructor.
public __destruct ( )

close() 공개 메소드

Close the backend.
public close ( ) : boolean
리턴 boolean True on success, false otherwise.

destroy() 공개 메소드

This method should only be called internally by PHP via session_set_save_handler().
public destroy ( string $id ) : boolean
$id string The session identifier.
리턴 boolean True on success, false otherwise.

gc() 공개 메소드

This method should only be called internally by PHP via session_set_save_handler().
public gc ( integer $maxlifetime = 300 ) : boolean
$maxlifetime integer The maximum age of a session.
리턴 boolean True on success, false otherwise.

getSessionIDs() 공개 메소드

Get a list of the valid session identifiers.
public getSessionIDs ( ) : array
리턴 array A list of valid session identifiers.

getSessionsInfo() 공개 메소드

Returns a list of authenticated users and data about their session.
public getSessionsInfo ( ) : array
리턴 array For authenticated users, the sessionid as a key and the session information as value. If no parsing function was provided, will always return an empty array.

open() 공개 메소드

Open the backend.
public open ( string $save_path = null, string $session_name = null ) : boolean
$save_path string The path to the session object.
$session_name string The name of the session.
리턴 boolean True on success, false otherwise.

read() 공개 메소드

This method should only be called internally by PHP via session_set_save_handler().
public read ( string $id ) : string
$id string The session identifier.
리턴 string The session data.

write() 공개 메소드

This method should only be called internally by PHP via session_set_save_handler().
public write ( string $id, string $session_data ) : boolean
$id string The session identifier.
$session_data string The session data.
리턴 boolean True on success, false otherwise.

프로퍼티 상세

$_connected 보호되어 있는 프로퍼티

Has a connection been made to the backend?
protected bool $_connected
리턴 boolean

$_logger 보호되어 있는 프로퍼티

A logger instance.
protected Horde_Log_Logger $_logger
리턴 Horde_Log_Logger

$_params 보호되어 있는 프로퍼티

Configuration parameters.
protected array $_params
리턴 array

$_sig 보호되어 있는 프로퍼티

Initial session data signature.
protected string $_sig
리턴 string

$_storage 보호되어 있는 프로퍼티

The storage object.
protected Horde_SessionHandler_Storage $_storage
리턴 Horde_SessionHandler_Storage

$changed 공개적으로 프로퍼티

If true, indicates the session data has changed.
public bool $changed
리턴 boolean