Class TUser

Description

Implements interfaces:

TUser class

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

TUser is meant to be used together with IUserManager.

Located in /Security/TUser.php (line 34)

TComponent
   |
   --TUser
Method Summary
TUser __construct (IUserManager $manager)
boolean getIsGuest ()
string getName ()
array getRoles ()
boolean isInRole (string $role)
IUser loadFromString (string $data)
string saveToString ()
void setIsGuest (boolean $value)
void setName (string $value)
array|string setRoles (mixed $value)
Methods
Constructor __construct (line 57)

Constructor.

  • access: public
TUser __construct (IUserManager $manager)
getIsGuest (line 90)
  • return: if the user is a guest
  • access: public
boolean getIsGuest ()
getManager (line 66)
  • return: user manager
  • access: public
IUserManager getManager ()
getName (line 74)
  • return: username
  • access: public
string getName ()
getRoles (line 110)
  • return: list of roles that the user is of
  • access: public
array getRoles ()
isInRole (line 137)
  • return: whether the user is of this role
  • access: public
boolean isInRole (string $role)
  • string $role: role to be tested. Note, role is case-insensitive.
loadFromString (line 157)
  • return: the user object
  • access: public
IUser loadFromString (string $data)
  • string $data: user data that is serialized and restored from session
saveToString (line 148)
  • return: user data that is serialized and will be stored in session
  • access: public
string saveToString ()
setIsGuest (line 98)
  • access: public
void setIsGuest (boolean $value)
  • boolean $value: if the user is a guest
setName (line 82)
  • access: public
void setName (string $value)
  • string $value: username
setRoles (line 118)
  • return: list of roles that the user is of. If it is a string, roles are assumed by separated by comma
  • access: public
array|string setRoles (mixed $value)

Inherited Methods

Inherited From TComponent

TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()

Documentation generated on Sun, 04 Jun 2006 19:00:36 -0400 by phpDocumentor 1.3.0RC4