[ Index ]
 

Code source de PRADO 3.0.6

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

title

Body

[fermer]

/framework/Security/ -> TUser.php (sommaire)

TUser class file.

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TUser.php 1397 2006-09-07 07:55:53Z wei $
Poids: 170 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

TUser:: (11 méthodes):
  __construct()
  getManager()
  getName()
  setName()
  getIsGuest()
  setIsGuest()
  getRoles()
  setRoles()
  isInRole()
  saveToString()
  loadFromString()


Classe: TUser  - X-Ref

TUser class

TUser implements basic user functionality for a prado application.
To get the name of the user, use {@link getName Name} property.
The property {@link getIsGuest IsGuest} tells if the user a guest/anonymous user.
To obtain or test the roles that the user is in, use property
{@link getRoles Roles} and call {@link isInRole()}, respectively.

TUser is meant to be used together with {@link IUserManager}.

__construct(IUserManager $manager)   X-Ref
Constructor.

param: IUserManager user manager

getManager()   X-Ref

return: IUserManager user manager

getName()   X-Ref

return: string username

setName($value)   X-Ref

param: string username

getIsGuest()   X-Ref

return: boolean if the user is a guest

setIsGuest($value)   X-Ref

param: boolean if the user is a guest

getRoles()   X-Ref

return: array list of roles that the user is of

setRoles($value)   X-Ref

return: array|string list of roles that the user is of. If it is a string, roles are assumed by separated by comma

isInRole($role)   X-Ref

param: string role to be tested. Note, role is case-insensitive.
return: boolean whether the user is of this role

saveToString()   X-Ref

return: string user data that is serialized and will be stored in session

loadFromString($data)   X-Ref

param: string user data that is serialized and restored from session
return: IUser the user object



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