Stud.IP  5.4
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()

__construct ( )

Member Function Documentation

◆ check_ticket()

static check_ticket (   $studipticket)
static

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

Parameters
string$studipticket
Returns
bool

◆ close()

close ( )

Close callback

◆ del()

del ( )

Delete callback

◆ delete()

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()

freeze (   $id = null,
  $sess_data = null 
)

Write callback.

◆ gc()

gc ( )
Returns
bool

◆ get_current_session_state()

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

◆ get_session_vars()

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

◆ get_ticket()

static get_ticket ( )
static

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

Returns
string

◆ is_current_session_authenticated() [1/2]

static is_current_session_authenticated ( )
static

◆ is_current_session_authenticated() [2/2]

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 (   $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 ( )

Open callback

◆ regenerate_session_id()

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

◆ set_container()

set_container ( )

?

◆ start()

start ( )

Start a new session or recovers from an existing session

Returns
boolean session_start() return value public

◆ thaw()

thaw ( )

Read callback.


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