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

Class: TSession

Source Location: /TSession.php

Class Overview


TSession class

Class Details

[line 35]
TSession class

TSession class is an implementation of ISession interface based on $_SESSION.

TSesson simply encapsulates what you can do with $_SESSION. You may want to extend this class or simply implement directly ISession interface to provide your own session handling classes (e.g.: you may want to use DB to store session data.)

Namespace: System.Security




version:  v1.0, last update on 2004/10/24 12:00:00
author:  Qiang Xue <qiang.xue@gmail.com>


[ Top ]

Variables

Methods



Class Variables

$cacheExpire = 0

[line 51]

Cache expire (in minutes)



access:  protected

Type:   integer


[ Top ]

$enabled = false

[line 46]

Whether the session is enabled.



access:  protected

Type:   boolean


[ Top ]

$savePath = ''

[line 56]

The path used to save the session files



access:  protected

Type:   string


[ Top ]

$started = false

[line 41]

Whether the session is started.



access:  protected

Type:   boolean


[ Top ]



Class Methods


constructor __construct [line 64]

TSession __construct( mixed $config)

Constructor.

Parses the configuration passed from application specification. Sets the value indicating whether to start session.




Parameters:

mixed   $config   the configuration data.

[ Top ]

method clear [line 115]

void clear( string $name)

Unsets a session variable.



access:  public


Parameters:

string   $name   the session variable name

[ Top ]

method destroy [line 141]

void destroy( )

Destroys the session.



access:  public


[ Top ]

method get [line 90]

mixed get( the $name)

Returns the value of the named session variable



return:  the value of the session variable
access:  public


Parameters:

the   $name   name of the session variable

[ Top ]

method getSessionID [line 159]

string getSessionID( )



return:  session ID
access:  public


[ Top ]

method has [line 80]

boolean has( mixed $name)

Checks if the named session variable exists.



return:  whether the named session variable exists
access:  public


[ Top ]

method isStarted [line 151]

boolean isStarted( )



return:  whether the session is started
access:  public


[ Top ]

method set [line 100]

void set( string $name, mixed $value)

Sets a session variable



access:  public


Parameters:

string   $name   the session variable name
mixed   $value   the variable value. If the value is null, the corresponding session variable will be cleared.

[ Top ]

method start [line 124]

void start( )

Starts the session.



access:  public


[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.