Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitGroupFacade

Core::Facade::arbitGroupFacade

Interface arbitGroupFacade

Group facade defining all methods required to access group related data in the backend.

Group facade defining all methods required to access group related data in the backend.

Author(s):
Version:   $Revision: 1236 $
License:   GPL

Method Summary

public mixed createGroup( $name )
Create a new group Create a new group with the given name. there already is a group with the given name.
public array getAllGroupIDs( )
Get array of groups Return an array with the IDs of all available groups in the database.
public array getGroupData( $group )
Get group data Get data for the given group name. array, and should contain the following keys:
  • name
  • description
  • users
  • permissions
Where users and permissions are arrays containg the list of users (their login names) repectively the permission string keys.
public array getPrivilegesForUser( $user )
Get privileges for user Get the privileges for a user, given the users ID, as an array of strings defining the privileges the user has.
public void updateGroupData( $group , $data )
Update stored information for the given group The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Methods

createGroup

mixed createGroup( string $name )

Create a new group Create a new group with the given name. there already is a group with the given name.

Create a new group Create a new group with the given name. An exception will be thrown if there already is a group with the given name. The ID generated by the backend in some way is returned for later reference. The type of the identifier depends on the backend, no assumptions should be made here.

Parameters:
Name Type Description
$name string

getAllGroupIDs

array getAllGroupIDs( )

Get array of groups Return an array with the IDs of all available groups in the database.

Get array of groups Return an array with the IDs of all available groups in the database.

getGroupData

array getGroupData( string $group )

Get group data Get data for the given group name. array, and should contain the following keys:

  • name
  • description
  • users
  • permissions
Where users and permissions are arrays containg the list of users (their login names) repectively the permission string keys.

Get group data Get data for the given group name. The data should be returned as an array, and should contain the following keys:

  • name
  • description
  • users
  • permissions
Where users and permissions are arrays containg the list of users (their login names) repectively the permission string keys.

Parameters:
Name Type Description
$group string

getPrivilegesForUser

array getPrivilegesForUser( string $user )

Get privileges for user Get the privileges for a user, given the users ID, as an array of strings defining the privileges the user has.

Get privileges for user Get the privileges for a user, given the users ID, as an array of strings defining the privileges the user has.

Parameters:
Name Type Description
$user string

updateGroupData

void updateGroupData( string $group , array $data )

Update stored information for the given group The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Update stored information for the given group The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Parameters:
Name Type Description
$group string
$data array
Documentation generated on Mon, 05 Apr 2010 14:01:57 +0200 by phpDocumentor 1.4.3