PHP Класс Horde_Session, horde

Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$maxStore integer Maximum size of the pruneable data store.
$sessionHandler Horde_SessionHandler The session handler object.

Защищенные свойства (Protected)

Свойство Тип Описание
$_active boolean Indicates that the session is active (read/write).
$_cleansession boolean Indicate that a new session ID has been generated for this page load.
$_data array Pointer to the session data.
$_readonly boolean Indicates that session data is read-only.
$_relogin integer On re-login, indicate whether we were previously authenticated.

Открытые методы

Метод Описание
__construct ( ) Constructor.
__get ( $name )
__set ( $name, $value )
checkNonce ( string $nonce ) Checks the validity of the session nonce.
checkToken ( string $token ) Checks the validity of the session token.
clean ( ) : boolean Destroys any existing session on login and make sure to use a new session ID, to avoid session fixation issues. Should be called before checking a login.
close ( ) Close the current session.
destroy ( ) Destroy session data.
exists ( string $app, string $name ) : boolean Does the session variable exist?
get ( string $app, string $name, integer $mask ) : mixed Get the value of a session variable.
getNonce ( ) : string Returns a single-use, session nonce.
getToken ( ) : string Returns the session token.
isActive ( ) : boolean Is the current session active (read/write)?
purge ( $id )
regenerate ( ) Regenerate the session ID.
remove ( string $app, string $name = null ) Remove session key(s).
retrieve ( $id )
set ( string $app, string $name, mixed $value, integer $mask ) Sets the value of a session variable.
setup ( boolean $start = true, string $cache_limiter = null, string $session_id = null ) Sets a custom session handler up, if there is one.
start ( ) Starts the session.
store ( $data, $prune = true, $id = null )

Приватные методы

Метод Описание
_getKey ( string $app, string $name ) : string Generates the unique storage key.
_start ( ) Tasks to perform when starting a session.
_subkeys ( string $app, string $name ) : array Return the list of subkeys for a master key.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( )

__get() публичный Метод

public __get ( $name )

__set() публичный Метод

public __set ( $name, $value )

checkNonce() публичный Метод

Checks the validity of the session nonce.
С версии: 2.11.0
public checkNonce ( string $nonce )
$nonce string Nonce to check.

checkToken() публичный Метод

Checks the validity of the session token.
public checkToken ( string $token )
$token string Token to check.

clean() публичный Метод

Destroys any existing session on login and make sure to use a new session ID, to avoid session fixation issues. Should be called before checking a login.
public clean ( ) : boolean
Результат boolean True if the session was cleaned.

close() публичный Метод

Close the current session.
public close ( )

destroy() публичный Метод

Destroy session data.
public destroy ( )

exists() публичный Метод

Does the session variable exist?
public exists ( string $app, string $name ) : boolean
$app string Application name.
$name string Session variable name.
Результат boolean True if session variable exists.

get() публичный Метод

Get the value of a session variable.
public get ( string $app, string $name, integer $mask ) : mixed
$app string Application name.
$name string Session variable name.
$mask integer One of: - Horde_Session::TYPE_ARRAY - Return an array value. - Horde_Session::TYPE_OBJECT - Return an object value.
Результат mixed The value or null if the value doesn't exist.

getNonce() публичный Метод

Returns a single-use, session nonce.
С версии: 2.11.0
public getNonce ( ) : string
Результат string Session nonce.

getToken() публичный Метод

Returns the session token.
public getToken ( ) : string
Результат string Session token.

isActive() публичный Метод

Is the current session active (read/write)?
public isActive ( ) : boolean
Результат boolean True if the current session is active.

purge() публичный Метод

Устаревший: Use Horde_Core_Cache_SessionObjects instead.
public purge ( $id )

regenerate() публичный Метод

Regenerate the session ID.
С версии: 2.5.0
public regenerate ( )

remove() публичный Метод

Remove session key(s).
public remove ( string $app, string $name = null )
$app string Application name.
$name string Session variable name.

retrieve() публичный Метод

Устаревший: Use Horde_Core_Cache_SessionObjects instead.
public retrieve ( $id )

set() публичный Метод

Sets the value of a session variable.
public set ( string $app, string $name, mixed $value, integer $mask )
$app string Application name.
$name string Session variable name.
$value mixed Session variable value.
$mask integer One of: - Horde_Session::TYPE_ARRAY: Force save as an array value. - Horde_Session::TYPE_OBJECT: Force save as an object value. - Horde_Session::ENCRYPT: Encrypt the value. (since 2.7.0)

setup() публичный Метод

Sets a custom session handler up, if there is one.
public setup ( boolean $start = true, string $cache_limiter = null, string $session_id = null )
$start boolean Initiate the session?
$cache_limiter string Override for the session cache limiter value.
$session_id string The session ID to use.

start() публичный Метод

Starts the session.
public start ( )

store() публичный Метод

Устаревший: Use Horde_Core_Cache_SessionObjects instead.
public store ( $data, $prune = true, $id = null )

Описание свойств

$_active защищенное свойство

Indicates that the session is active (read/write).
protected bool $_active
Результат boolean

$_cleansession защищенное свойство

Indicate that a new session ID has been generated for this page load.
protected bool $_cleansession
Результат boolean

$_data защищенное свойство

Pointer to the session data.
protected array $_data
Результат array

$_readonly защищенное свойство

Indicates that session data is read-only.
protected bool $_readonly
Результат boolean

$_relogin защищенное свойство

On re-login, indicate whether we were previously authenticated.
protected int $_relogin
Результат integer

$maxStore публичное свойство

Maximum size of the pruneable data store.
public int $maxStore
Результат integer

$sessionHandler публичное свойство

The session handler object.
public Horde_SessionHandler $sessionHandler
Результат Horde_SessionHandler