Search:

# CWIS Developers Documentation

# PrivilegeFactory Class Reference

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

Collaboration diagram for PrivilegeFactory:
[legend]

## 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.
## Predicates
| PrivilegeNameExists ($Name)
| Determine if a privilege with the given name exists.
| PrivilegeValueExists ($Value)
| Determine if a privilege with the given value exists.

List of all members.

## Detailed Description

Factory which extracts all defined privileges from the database.

Definition at line 24 of file PrivilegeFactory.php.

Inheritance diagram for PrivilegeFactory:
[legend]

## Member Function Documentation

PrivilegeFactory::GetPredefinedPrivilegeConstants | ( | ) |

Get all predefined privilege constants and their values.

Returns:
  an array with the privilege ID as the key

Definition at line 170 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 ItemFactory::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 94 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 138 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 185 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 217 of file PrivilegeFactory.php.

References GetPrivileges().

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

- PrivilegeFactory.php