## Interface IUser

Description

IUser interface.

This interface must be implemented by user objects.

- since: 3.0
- version: $Id: interfaces.php 1693 2007-02-13 04:33:05Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /interfaces.php (line 113)

Method Summary
boolean getIsGuest ()
string getName ()
array getRoles ()
boolean isInRole (string $role)
IUser loadFromString (string $string)
string saveToString ()
void setIsGuest (boolean $value)
void setName (string $value)
array|string setRoles (mixed $value)
Methods
getIsGuest (line 126)

- return: if the user is a guest
- access: public

boolean getIsGuest ()
getName (line 118)

- return: username
- access: public

string getName ()
getRoles (line 134)

- return: list of roles that the user is of
- access: public

array getRoles ()
isInRole (line 143)

- return: whether the user is of this role
- access: public

boolean isInRole (string $role)

- string $role: role to be tested

loadFromString (line 152)

- return: the user object
- access: public

IUser loadFromString (string $string)

- string $string: user data that is serialized and restored from session

saveToString (line 147)

- return: user data that is serialized and will be stored in session
- access: public

string saveToString ()
setIsGuest (line 130)

- access: public

void setIsGuest (boolean $value)

- boolean $value: if the user is a guest

setName (line 122)

- access: public

void setName (string $value)

- string $value: username

setRoles (line 138)

- 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)

Documentation generated on Mon, 21 Apr 2008 11:29:23 -0400 by phpDocumentor 1.3.0RC4