Docs For Class DAViCalSession

## DAViCalSession

Description

A class for creating and holding session information.

Located in /inc/DAViCalSession.php (line 48)

    Session
       |
       --DAViCalSession

Variable Summary
mixed $principal_id
Method Summary
DAViCalSession __construct ([string $sid = ''])
void AssignSessionDetails (object $u)
void GetRoles ()
boolean HavePrivilegeTo ($do_what $do_what, $path $path, [$any $any = null])
boolean LoginRequired ([string $roles = ''])
Variables
mixed $principal_id (line 51)

- access: public

Methods
Constructor __construct (line 62)

Create a new DAViCalSession object.

We create a Session and extend it with some additional useful DAViCal related information.

DAViCalSession __construct ([string $sid = ''])

- string $sid: A session identifier.

AssignSessionDetails (line 72)

Internal function used to assign the session details to a user's new session.

void AssignSessionDetails (object $u)

- object $u: The user+session object we (probably) read from the database.

GetRoles (line 92)

Method used to get the user's roles

void GetRoles ()
HavePrivilegeTo (line 111)

Does the user have the privileges to do what is requested.

- return: Whether they do have one of those privileges against the specified path.

boolean HavePrivilegeTo ($do_what $do_what, $path $path, [$any $any = null])

- $do_what $do_what: mixed The request privilege name, or array of privilege names, to be checked.
- $path $path: string The path we want that permission for
- $any $any: boolean Whether we accept any of the privileges. The default is true, unless the requested privilege is 'all', when it is false.

LoginRequired (line 134)

Checks that this user is logged in, and presents a login screen if they aren't.

The function can optionally confirm whether they are a member of one of a list of roles, and deny access if they are not a member of any of them.

- return: Whether or not the user is logged in and is a member of one of the required roles.

boolean LoginRequired ([string $roles = ''])

- string $roles: The list of roles that the user must be a member of one of to be allowed to proceed.

Documentation generated on Sun, 08 Jul 2012 12:53:48 +0000 by phpDocumentor 1.4.3