rcube_session_db

Extends \rcube_session

Class to provide database session storage

package

Framework

subpackage

Core

author

Thomas Bruederli roundcube@gmail.com

author

Aleksander Machniak alec@alec.pl

author

Cor Bosman cor@roundcu.be

Methods

__construct

__construct(Object $config) 
inherited

Arguments

$config

Object

Merge vars with old vars and apply unsets

_fixvars( $vars,  $oldvars) 
inherited

Arguments

$vars

$oldvars

Create session cookie for specified time slot.

_mkcookie( $timeslot) : string
inherited

Arguments

$timeslot

Response

string

Append the given value to the certain node in the session data array

append( $path,  $key,  $value) 
inherited

Warning: Do not use if you already modified $_SESSION in the same request (#1490608)

Arguments

$path

$key

$value

Check session authentication cookie

check_auth() : boolean
inherited

Response

boolean

True if valid, False if not

close

close() 
inherited abstract

Creates a new (separate) session

create( $data) : string
inherited

Arguments

$data

Response

string

Session identifier (on success)

destroy

destroy( $key) 
inherited abstract

Arguments

$key

Factory, returns driver-specific instance of the class

factory(object $config) : Object
inherited static

Arguments

$config

object

Response

Object

rcube_session

Execute registered garbage collector routines

gc( $maxlifetime) 
inherited

Arguments

$maxlifetime

Clean up db sessions.

gc_db() 

Garbage collector handler to run on script shutdown

gc_shutdown() 
inherited

See if we have vars of this key already cached, and if so, return them.

get_cache(string $key) : string
inherited

Arguments

$key

string

Session ID

Response

string

Getter for remote IP saved with this session

get_ip() 
inherited

Returns a reference to the node in data array referenced by the given path.

get_node( $path,  &$data_arr) 
inherited

e.g. ['compose','attachments'] will return $_SESSION['compose']['attachments']

Arguments

$path

$data_arr

Kill this session

kill() 
inherited

Writes debug information to the log

log( $line) 
inherited

Arguments

$line

Abstract methods should be implemented by driver classes

open( $save_path,  $session_name) 
inherited abstract

Arguments

$save_path

$session_name

read

read( $key) 
inherited abstract

Arguments

$key

Generate and set new session id

regenerate_id(boolean $destroy = true) : boolean
inherited

Arguments

$destroy

boolean

If enabled the current session will be destroyed

Response

boolean

Register additional garbage collector functions

register_gc_handler( $func) 
inherited

Arguments

$func

register session handler

register_session_handler() 
inherited

Re-read session data from storage backend

reload() 
inherited

Unset a session variable

remove( $var = null) : boolean
inherited

Arguments

$var

Response

boolean

True on success

Serialize session data

serialize( $vars) 
inherited

Arguments

$vars

session write handler. This calls the implementation methods for write/update after some initial checks.

sess_write( $key,  $vars) : boolean
inherited

Arguments

$key

$vars

Response

boolean

Setter for the cookie name used for session cookie

set_cookiename( $cookiename) 
inherited

Arguments

$cookiename

Enable/disable IP check

set_ip_check( $check) 
inherited

Arguments

$check

Setter for session lifetime

set_lifetime( $lifetime) 
inherited

Arguments

$lifetime

Setter for cookie encryption secret

set_secret( $secret = null) 
inherited

Arguments

$secret

Wrapper for session_start()

start() 
inherited

Unserialize session data http://www.php.net/manual/en/function.session-decode.php#56106

unserialize( $str) 
inherited

Arguments

$str

update

update( $key,  $newvars,  $oldvars) 
inherited abstract

Arguments

$key

$newvars

$oldvars

write

write( $key,  $vars) 
inherited abstract

Arguments

$key

$vars

Wrapper for session_write_close()

write_close() 
inherited

Properties

db

db : 

Type(s)

table_name

table_name : 

Type(s)

config

config : 
inherited

Type(s)

key

key : 
inherited

Type(s)

ip

ip : 
inherited

Type(s)

changed

changed : 
inherited

Type(s)

start

start : 
inherited

Type(s)

vars

vars : 
inherited

Type(s)

now

now : 
inherited

Type(s)

time_diff

time_diff : 
inherited

Type(s)

reloaded

reloaded : 
inherited

Type(s)

appends

appends : 
inherited

Type(s)

unsets

unsets : 
inherited

Type(s)

gc_enabled

gc_enabled : 
inherited

Type(s)

gc_handlers

gc_handlers : 
inherited

Type(s)

cookiename

cookiename : 
inherited

Type(s)

ip_check

ip_check : 
inherited

Type(s)

logging

logging : 
inherited

Type(s)

Blocks session data from being written to database.

nowrite : boolean
inherited

Can be used if write-race conditions are to be expected

var

Type(s)

boolean