[ Index ]
 

Code source de PHPonTrax 2.6.6-svn

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/vendor/trax/ -> session.php (sommaire)

File containing the Session class (PHP 5)

Copyright: (c) 2005 John Peterson
Version: $Id: session.php 248 2006-08-23 06:24:54Z john $
Poids: 356 lignes (12 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Session:: (12 méthodes):
  get()
  set()
  is_valid_host()
  is_aol_host()
  get_hash()
  start()
  destory_session()
  unset_session()
  unset_var()
  isset_var()
  isset_flash()
  flash()


Classe: Session  - X-Ref

Keep track of state of the client's session with the server

Since there is no continuous connection between the client and the
web server, there must be some way to carry information forward
from one page to the next.  PHP does this with a global array variable
{@link http://www.php.net/manual/en/reserved.variables.php#reserved.variables.session $_SESSION}
which is automatically restored from an area of the server's hard disk
indicated by the contents of a cookie stored on the client's computer.
This class is a static class with convenience methods for accessing the
contents of $_SESSION.
get($key)   X-Ref
Get a session variable

Fetch the contents from a specified element of
{@link http://www.php.net/manual/en/reserved.variables.php#reserved.variables.session $_SESSION}
param: mixed $key Key to identify one particular session variable
return: mixed Content of the session variable with the specified

set($key, $value)   X-Ref
Set a session variable

Store a value in a specified element of
{@link http://www.php.net/manual/en/reserved.variables.php#reserved.variables.session $_SESSION}
param: mixed $key Key to identify one particular session variable
param: string $value Value to store in the session variable

is_valid_host()   X-Ref
Test whether the user host is as expected for this session

Compare the REMOTE_ADDR and HTTP_USER_AGENT elements of
{@link http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server $_SERVER}
to the expected values for this session.
return: boolean

is_aol_host()   X-Ref
Test whether the client is an AOL user

Check whether the domain name of the client's IP ends in
"proxy.aol.com" or the client's user agent name includes "AOL"
return: boolean

get_hash()   X-Ref
Get key that uniquely identifies this session

Calculate a unique session key based on the session ID and
user agent, plus the user's IP address if not on AOL.

start()   X-Ref
Start or continue a session


destory_session()   X-Ref
Destroy the user's session

Destroy all data registered to a session


unset_session()   X-Ref
Free all session variables currently registered


unset_var($key)   X-Ref
Unset a session variable

Unset the variable in
{@link http://www.php.net/manual/en/reserved.variables.php#reserved.variables.session $_SESSION}
identified by key $key

isset_var($key)   X-Ref
Test whether a session variable is defined in $_SESSION

Check the
{@link http://www.php.net/manual/en/reserved.variables.php#reserved.variables.session $_SESSION}
array for the existance of a variable identified by $key
param: mixed $key Key to identify one particular session variable
return: boolean

isset_flash($key)   X-Ref
Test whether there is a flash message to be shown

Check whether the
{@link http://www.php.net/manual/en/reserved.variables.php#reserved.variables.session $_SESSION}
array for this session contains a
flash message to be shown to the user.
param: mixed $key Key to identify one particular flash message
return: boolean

flash($key, $value = null)   X-Ref
Get or set a flash message

A flash message is a message that will appear prominently on
the next screen to be sent to the user. Flash
messages are intended to be shown to the user once then erased.
They are stored in the
{@link http://www.php.net/manual/en/reserved.variables.php#reserved.variables.session $_SESSION}
array for the user's session.

param: mixed $key Key to identify one particular flash message
param: string $value Content of the flash message if present
return: mixed Content of the flash message with the specified



Généré le : Sun Feb 25 20:04:38 2007 par Balluche grâce à PHPXref 0.7