Class rcube_session

Description

Class to provide database supported session storage

Located in /lib/Roundcube/rcube_session.php (line 29)


	
			
Method Summary
 rcube_session __construct ( $db,  $config)
 void append (string $path, string $key, mixed $value)
 boolean check_auth ()
 void close ()
 boolean db_destroy (string $key)
 boolean db_gc (string $maxlifetime)
 string db_read (string $key)
 boolean db_write (string $key, string $vars)
 void destroy (string $key)
 void gc ()
 void get_ip ()
 void kill ()
 void log ( $line)
 boolean mc_destroy (string $key)
 string mc_read (string $key)
 boolean mc_write (string $key, string $vars)
 void open ( $save_path,  $session_name)
 void regenerate_id ([boolean $destroy = true])
 void register_gc_handler (mixed $func)
 void reload ()
 boolean remove ([string $var = null])
 void set_auth_cookie ()
 void set_cookiename ( $cookiename)
 void set_ip_check ( $check)
 void set_lifetime ( $lifetime)
 void set_secret ( $secret)
 void _mkcookie (int $timeslot)
Methods
Constructor __construct (line 51)

Default constructor

  • access: public
rcube_session __construct ( $db,  $config)
  • $db
  • $config
append (line 391)

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

  • access: public
void append (string $path, string $key, mixed $value)
  • string $path: Path denoting the session variable where to append the value
  • string $key: Key name under which to append the new value (use null for appending to an indexed list)
  • mixed $value: Value to append to the session data array
check_auth (line 652)

Check session authentication cookie

  • return: True if valid, False if not
boolean check_auth ()
close (line 101)
  • access: public
void close ()
db_destroy (line 237)

Handler for session_destroy()

  • return: True on success
  • access: public
boolean db_destroy (string $key)
  • string $key: Session ID
db_gc (line 254)

Garbage collecting function

  • return: True on success
  • access: public
boolean db_gc (string $maxlifetime)
  • string $maxlifetime: Session lifetime in seconds
db_read (line 125)

Read session data from database

  • return: Session vars
  • access: public
string db_read (string $key)
  • string $key: Session ID
db_write (line 153)

Save session data.

handler for session_read()

  • return: True on success
  • access: public
boolean db_write (string $key, string $vars)
  • string $key: Session ID
  • string $vars: Serialized session vars
destroy (line 112)

Delete session data for the given key

  • access: public
void destroy (string $key)
  • string $key: Session ID
gc (line 343)

Execute registered garbage collector routines

  • access: public
void gc ()
get_ip (line 612)

Getter for remote IP saved with this session

  • access: public
void get_ip ()
kill (line 438)

Kill this session

  • access: public
void kill ()
log (line 710)

Writes debug information to the log

void log ( $line)
  • $line
mc_destroy (line 329)

Handler for session_destroy() with memcache backend

  • return: True on success
  • access: public
boolean mc_destroy (string $key)
  • string $key: Session ID
mc_read (line 273)

Read session data from memcache

  • return: Session vars
  • access: public
string mc_read (string $key)
  • string $key: Session ID
mc_write (line 298)

Save session data.

handler for session_read()

  • return: True on success
  • access: public
boolean mc_write (string $key, string $vars)
  • string $key: Session ID
  • string $vars: Serialized session vars
open (line 95)
  • access: public
void open ( $save_path,  $session_name)
  • $save_path
  • $session_name
regenerate_id (line 373)

Generate and set new session id

  • access: public
void regenerate_id ([boolean $destroy = true])
  • boolean $destroy: If enabled the current session will be destroyed
register_gc_handler (line 356)

Register additional garbage collector functions

  • access: public
void register_gc_handler (mixed $func)
  • mixed $func: Callback function
reload (line 450)

Re-read session data from storage backend

  • access: public
void reload ()
remove (line 413)

Unset a session variable

  • return: True on success
  • access: public
boolean remove ([string $var = null])
  • string $var: Variable name (can be a path denoting a certain node in the session array, e.g. compose.attachments.5)
set_auth_cookie (line 688)

Set session authentication cookie

void set_auth_cookie ()
set_cookiename (line 639)

Setter for the cookie name used for session cookie

void set_cookiename ( $cookiename)
  • $cookiename
set_ip_check (line 630)

Enable/disable IP check

void set_ip_check ( $check)
  • $check
set_lifetime (line 599)

Setter for session lifetime

  • access: public
void set_lifetime ( $lifetime)
  • $lifetime
set_secret (line 621)

Setter for cookie encryption secret

void set_secret ( $secret)
  • $secret
_mkcookie (line 701)

Create session cookie from session data

void _mkcookie (int $timeslot)
  • int $timeslot: Time slot to use

Documentation generated on Fri, 03 May 2013 12:45:05 +0200 by phpDocumentor 1.4.4