Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
Seminar_Session Class Reference

Public Member Functions

 __construct ()
 
 start ()
 
 name ($name= '')
 
 set_container ()
 
 regenerate_session_id ($keep_session_vars=[])
 
 delete ()
 
 open ()
 
 close ()
 
 del ()
 
 freeze ($id=null, $sess_data=null)
 
 thaw ()
 
 gc ()
 

Static Public Member Functions

static is_current_session_authenticated ()
 
static get_current_session_state ()
 
static get_session_vars ($sid)
 
static get_ticket ()
 
static check_ticket ($studipticket)
 
static is_current_session_authenticated ()
 

Detailed Description

PHPLib Sessions using PHP 4 build-in sessions and PHPLib storage container

Author
André Noack noack.nosp@m.@dat.nosp@m.a-que.nosp@m.st.d.nosp@m.e Maxim Derkachev kot@b.nosp@m.ooks.nosp@m..ru, Teodor Cimpoesu teo@d.nosp@m.igir.nosp@m.o.net,Ulf Wendel uw@ne.nosp@m.tuse.nosp@m..de

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

static check_ticket (   $studipticket)
static

checks the given string token against the one stored in the session

Parameters
string$studipticket
Returns
bool
close ( )

Close callback

del ( )

Delete callback

delete ( )

Delete the current session destroying all registered data.

Note that it does more but the PHP 4 session_destroy it also throws away a cookie is there's one.

Returns
boolean session_destroy return value public
freeze (   $id = null,
  $sess_data = null 
)

Write callback.

gc ( )
Returns
bool
static get_current_session_state ( )
static

Returns the state of the current session. Does not start a session. possible return values: 'authenticated' - session is valid and user is authenticated 'nobody' - session is valid, but user is not authenticated false - no valid session

Returns
string|false
static get_session_vars (   $sid)
static

returns a SessionDecoder object containing the session variables for the given session id

Parameters
string$sida session id
Returns
SessionDecoder
static get_ticket ( )
static

returns a random string token for XSRF prevention the string is stored in the session

Returns
string
static is_current_session_authenticated ( )
static
static is_current_session_authenticated ( )
static

Returns true, if the current session is valid and belongs to an authenticated user. Does not start a session.

Returns
bool
name (   $name = '')

Sets or returns the name of the current session

Parameters
stringIf given, sets the session name
Returns
string session_name() return value public
open ( )

Open callback

regenerate_session_id (   $keep_session_vars = [])
Parameters
array$keep_session_vars
set_container ( )

?

start ( )

Start a new session or recovers from an existing session

Returns
boolean session_start() return value public
thaw ( )

Read callback.


The documentation for this class was generated from the following files: