Welcompose
[ class tree: Welcompose ] [ index: Welcompose ] [ all elements ]

Class: Base_Session

Source Location: /base_classes/session.class.php

Class Overview




Variables

Methods



Class Details

[line 38]


[ Top ]


Class Variables

static $instance =  null

[line 44]

Singleton



Tags:

access:  public

Type:   object


[ Top ]

$_regex_session_id =  '=^[a-z0-9-,]{22,40}$=i'

[line 62]

Regex for the session id



Tags:

access:  protected

Type:   string


[ Top ]

$_regex_session_name =  '=^([a-z0-9-_]+)$=i'

[line 56]

Regex for the session name



Tags:

access:  protected

Type:   string


[ Top ]

$_session_started =  false

[line 50]

Wheter there's an open session or not



Tags:

access:  protected

Type:   bool


[ Top ]



Class Methods


constructor __construct [line 75]

Base_Session __construct( )

Start session

Creates new session object.

Example 1: Create new session object

  1. $session session::instance();




Tags:

access:  public


[ Top ]

method clear [line 128]

bool clear( )

Clear Session

Removes all the data from the session.




Tags:

access:  public


[ Top ]

method close [line 155]

bool close( )

Close Session

Method to kill the session. Removes the session and all the data.




Tags:

access:  public


[ Top ]

method getId [line 223]

string getId( )

Get Id

Returns the current session id.




Tags:

throws:  Base_SessionException
access:  public


[ Top ]

method getName [line 182]

string getName( )

Get Name

Returns the session name.




Tags:

throws:  Base_SessionException
access:  public


[ Top ]

method isStarted [line 309]

bool isStarted( )

Is started

Method to see if there's an open session or not.




Tags:

access:  public


[ Top ]

method open [line 90]

void open( )

Open New Sessions

If there's no open session, the method creates a new one.




Tags:

access:  public


[ Top ]

method regenerateId [line 265]

bool regenerateId( )

Regenerate Id

Replaces the current session id with a new one and removes the old session data.




Tags:

access:  public


[ Top ]

method save [line 108]

bool save( )

Save Session

Saves the current session (e.g. for redirect).




Tags:

access:  public


[ Top ]

method setId [line 246]

string setId( string $id)

Set Id

Method to set a new session id. Takes the new session id as first argument. Returns the session id.




Tags:

throws:  Base_SessionException
access:  public


Parameters:

string   $id   Session id

[ Top ]

method setName [line 204]

string setName( string $name)

Set Name

Method to set a new session name. Takes the new session name as first argument. Returns the session name.




Tags:

throws:  Base_SessionException
access:  public


Parameters:

string   $name   Session name

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:52:00 +0100 by phpDocumentor 1.4.3