Class PHRUTS_HttpSession

Description

Provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.

The session persists for a specified time period, across more than one connection or page request form the user. A session usually corresponds to one user, who may visit a site many times. The server can maintain a session many ways such as using cookies or rewriting URLs.

  • author: John WILDENAUER <jwilde@users.sourceforge.net> (PHP4 port of Struts)
  • author: Olivier HENRY <oliv.henry@gmail.com> (PHP5 port of Struts)
  • version: $Id: PHRUTS_HttpSession.php,v 1.2 2008/05/21 16:50:27 ohenry Exp $
  • copyright: Copyright PHruts 2008

Located in /connector/PHRUTS_HttpSession.php (line 36)


	
			
Variable Summary
Method Summary
PHRUTS_HttpSession __construct ()
void commit ()
void gc_execute ()
object The getAttribute (string $name)
string getId ()
void removeAttribute (string $name)
void setAttribute (string $name, object $value)
void setMaxInactiveInterval (integer $interval)
Variables
array $attributes = array() (line 52)
  • access: protected
integer $inactiveInterval = null (line 47)
  • todo: Comment the attribute.
  • access: protected
integer $maxInactiveInterval = null (line 41)
  • todo: Comment the attribute.
  • access: protected
Methods
Constructor __construct (line 57)
  • todo: Comment the method.
  • access: public
PHRUTS_HttpSession __construct ()
commit (line 191)
  • todo: Comment the method.
  • access: public
void commit ()
gc_execute (line 78)

Execution of the internal garbage collector.

  • access: protected
void gc_execute ()
getAttribute (line 128)

Returns the object bound with the specified name in this session, or null if no object is bound under the name.

  • return: object with the specified name
  • access: public
object The getAttribute (string $name)
  • string $name: A string specifying the name of the object
getAttributeNames (line 150)

Returns an array of string containing the names of all the objects bound to this session.

  • access: public
array getAttributeNames ()
getId (line 92)

Returns a string containing the unique identifier assigned to this session.

  • access: public
string getId ()
getMaxInactiveInterval (line 117)

Returns the maximum time interval, in seconds, that the server will keep this session open between client accesses.

After this interval, the server will invalidate the session.

  • access: public
integer getMaxInactiveInterval ()
removeAttribute (line 181)

Removes the object bound with the specified name form this session.

If the session does not have an object bound with the specified name, this method does nothing.

  • access: public
void removeAttribute (string $name)
  • string $name
setAttribute (line 166)

Binds an object to this session, using the name specified.

If an object of the same name is already bound to the session, the object is replaced.

  • access: public
void setAttribute (string $name, object $value)
  • string $name
  • object $value
setMaxInactiveInterval (line 102)

Specifies the time, in seconds, between client requests before the server will invalidate the session.

  • access: public
void setMaxInactiveInterval (integer $interval)
  • integer $interval

Documentation generated on Sat, 31 May 2008 15:46:12 +0200 by phpDocumentor 1.4.1