SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Session

Session library.

Variables

NameVisibilityDescription
$config (static) 
$driver (static) 
$flash (static) 
$instance (static) 
$protect (static) 

Functions

NameVisibilityDescription
__constructpublicOn first session instance creation, sets up the driver and creates session.
createpublic (static)Create a new session.
deletallpublic (static)Removes all session variables.
deletepublic (static)Delete one or more variables.
destroypublic (static)Destroys the current session.
expireFlashpublic (static)Expires old flash data and removes it from the session.
getpublic (static)Get a variable. Access to sub-arrays is supported with key.subkey.
getOncepublic (static)Get a variable, and delete it.
haspublic (static) 
idpublic (static)Get the session id.
instancepublic (static)Singleton instance of Session.
keepFlashpublic (static)Freshen one, multiple or all flash variables.
regeneratepublic (static)Regenerates the global session id.
setpublic (static)Set a session variable.
setFlashpublic (static)Set a flash variable.
writeClosepublic (static)Runs the system.session_write event, then calls session_write_close.

public __construct

void $Session->__construct ( );

On first session instance creation, sets up the driver and creates session.

public create

void Session::create ( [ array $vars ] );

Create a new session.

public deletall

void Session::deletall ( );

Removes all session variables.

public delete

void Session::delete ( string $keys );

Delete one or more variables.

public destroy

void Session::destroy ( );

Destroys the current session.

public expireFlash

void Session::expireFlash ( );

Expires old flash data and removes it from the session.

public get

mixed Session::get ( [ string $key [, mixed $default ]] );

Get a variable. Access to sub-arrays is supported with key.subkey.

public getOnce

mixed Session::getOnce ( string $key [, mixed $default ] );

Get a variable, and delete it.

public has

bool Session::has ( string $key );

This function does not have a description

public id

string Session::id ( );

Get the session id.

public instance

unknown Session::instance ( );

Singleton instance of Session.

public keepFlash

void Session::keepFlash ( [ string $keys ] );

Freshen one, multiple or all flash variables.

public regenerate

void Session::regenerate ( );

Regenerates the global session id.

public set

void Session::set ( string|array $keys [, mixed $val ] );

Set a session variable.

public setFlash

void Session::setFlash ( string|array $keys [, mixed $val ] );

Set a flash variable.

public writeClose

void Session::writeClose ( );

Runs the system.session_write event, then calls session_write_close.