PrivilegeFactory Class Reference

Factory which extracts all defined privileges from the database. More...

Inheritance diagram for PrivilegeFactory:

Inheritance graph
[legend]
Collaboration diagram for PrivilegeFactory:

Collaboration graph
[legend]
List of all members.

Setup/Initialization

 PrivilegeFactory ()
 Object constructor.

Accessors

 GetPrivileges ($IncludePredefined=TRUE, $ReturnObjects=TRUE)
 Get all privileges.
 GetPrivilegeWithName ($Name)
 Get the Privilege object with the given name.
 GetPrivilegeWithValue ($Value)
 Get the Privilege object with the given value.
 GetPredefinedPrivilegeConstants ()
 Get all predefined privilege constants and their values.
 GetItemNames ($SqlCondition=NULL)
 Retrieve human-readable privilege names.

Predicates

 PrivilegeNameExists ($Name)
 Determine if a privilege with the given name exists.
 PrivilegeValueExists ($Value)
 Determine if a privilege with the given value exists.

Detailed Description

Factory which extracts all defined privileges from the database.

Definition at line 24 of file PrivilegeFactory.php.


Member Function Documentation

PrivilegeFactory::GetItemNames ( SqlCondition = NULL  ) 

Retrieve human-readable privilege names.

This method overloads the inherited version from ItemFactory to add in the predefined privileges.

Parameters:
SqlCondition SQL condition (w/o "WHERE") for name retrieval. (OPTIONAL)
Returns:
Array with item names as values and item IDs as indexes

Reimplemented from ItemFactory.

Definition at line 183 of file PrivilegeFactory.php.

Referenced by GetPrivileges().

Here is the caller graph for this function:

PrivilegeFactory::GetPredefinedPrivilegeConstants (  ) 

Get all predefined privilege constants and their values.

Returns:
an array with the privilege ID as the key

Definition at line 172 of file PrivilegeFactory.php.

PrivilegeFactory::GetPrivileges ( IncludePredefined = TRUE,
ReturnObjects = TRUE 
)

Get all privileges.

Parameters:
IncludePredefined (OPTIONAL)
ReturnObjects (OPTIONAL)
Returns:
An array of privilege objects or strings with the priv id for the index

Definition at line 60 of file PrivilegeFactory.php.

References GetItemNames().

Referenced by GetPrivilegeWithName(), GetPrivilegeWithValue(), PrivilegeNameExists(), and PrivilegeValueExists().

Here is the caller graph for this function:

PrivilegeFactory::GetPrivilegeWithName ( Name  ) 

Get the Privilege object with the given name.

Parameters:
$Name privilege name
Returns:
a Privilege object or NULL if one doesn't exist with the name

Definition at line 96 of file PrivilegeFactory.php.

References GetPrivileges().

PrivilegeFactory::GetPrivilegeWithValue ( Value  ) 

Get the Privilege object with the given value.

Parameters:
$Value privilege value
Returns:
a Privilege object or NULL if one doesn't exist with the value

Definition at line 140 of file PrivilegeFactory.php.

References GetPrivileges().

PrivilegeFactory::PrivilegeFactory (  ) 

Object constructor.

Definition at line 32 of file PrivilegeFactory.php.

References ItemFactory::ItemFactory().

PrivilegeFactory::PrivilegeNameExists ( Name  ) 

Determine if a privilege with the given name exists.

Parameters:
$Name privilege name
Returns:
TRUE if a privilege with the given name exists

Definition at line 201 of file PrivilegeFactory.php.

References GetPrivileges().

PrivilegeFactory::PrivilegeValueExists ( Value  ) 

Determine if a privilege with the given value exists.

Parameters:
$Value privilege value
Returns:
TRUE if a privilege with the given value exists

Definition at line 233 of file PrivilegeFactory.php.

References GetPrivileges().


The documentation for this class was generated from the following file: