Class PrincipalService

Description

This Service Interface holds methods for loading and manipulating Prinicpals.

Receive an PrincipalService instance by calling:

  1.  $services ServiceFactory::get();
  2.  $principalService $services->getPrincipalService();

Make sure to use the right funtion to set User values:

setAttributes() for all Metadata like the values within the User Admin Plugin. setParemeter() for special values like User Language and active Flag.

  • author: Kevin Papst
  • version: $Id: PrincipalService.php,v 1.4 2007/12/27 21:38:59 kpapst Exp $
  • copyright: Copyright (C) 2002-2006 Kevin Papst
  • license: GNU Public License


			
Direct descendents
Class Description
DefaultPrincipalService Default implementation of the BIGACE PrincipalService.
Method Summary
PrincipalService PrincipalService ()
mixed createPrincipal ( $name,  $password,  $language)
boolean deleteAttributes ( $principal)
boolean deletePrincipal ( $principal)
array getAllPrincipals ()
array getAttributes ( $principal)
mixed getParameter ( $principal,  $parameter)
mixed lookup ( $principalName)
mixed lookupByID ( $principalID)
boolean setAttribute ( $principal,  $attribute,  $value)
boolean setParameter ( $principal,  $parameter,  $value)
Methods
Constructor PrincipalService (line 66)
PrincipalService PrincipalService ()
createPrincipal (line 131)

Creates a Principal.

Returns false if the Principal could not be created.

  • return: the Principal or false
mixed createPrincipal ( $name,  $password,  $language)
  • $name
  • $password
  • $language

Redefined in descendants as:
deleteAttributes (line 92)

Deletes all attributes for the given Principal.

  • return: true on success otherwise false
boolean deleteAttributes ( $principal)
  • $principal

Redefined in descendants as:
deletePrincipal (line 140)

Deletes a Principal.

Returns false if the Principal could not be deleted.

  • return: true on success otherwise false
boolean deletePrincipal ( $principal)
  • $principal

Redefined in descendants as:
getAllPrincipals (line 104)

Get an Array with all available Principals.

  • return: an array with Principal instances
array getAllPrincipals ()

Redefined in descendants as:
getAttributes (line 76)

Returns the Principal Attributes as a key-value mapped Array.

If no Attributes could be found it returns an empty array.

  • return: the Principal Attributes
array getAttributes ( $principal)
  • $principal

Redefined in descendants as:
getParameter (line 171)

Gets the given Parameter for the Principal.

If the passed Parameter could not be found or is invalid null will be returned.

The allowed Parameter are:

  • PRINCIPAL_PARAMETER_PASSWORD
  • PRINCIPAL_PARAMETER_ACTIVE
  • PRINCIPAL_PARAMETER_LANGUAGE

  • return: the value or null if not found
mixed getParameter ( $principal,  $parameter)
  • $principal
  • $parameter

Redefined in descendants as:
lookup (line 113)

Tries to find a Principal with the given Name.

Returns null if none could be found.

  • return: a Principal or null
mixed lookup ( $principalName)
  • $principalName

Redefined in descendants as:
lookupByID (line 122)

Tries to find a Principal with the given ID.

Returns null if none could be found.

  • return: a Principal or null
mixed lookupByID ( $principalID)
  • $principalID

Redefined in descendants as:
setAttribute (line 84)

Sets the attribute-value mapping for the given Principal.

  • return: true on success otherwise false
boolean setAttribute ( $principal,  $attribute,  $value)
  • $principal
  • $attribute
  • $value

Redefined in descendants as:
setParameter (line 154)

Sets the given Parameter for the Principal.

The allowed Parameter are:

  • PRINCIPAL_PARAMETER_PASSWORD
  • PRINCIPAL_PARAMETER_ACTIVE
  • PRINCIPAL_PARAMETER_LANGUAGE

  • return: true on success otherwise false
boolean setParameter ( $principal,  $parameter,  $value)
  • $principal
  • $parameter
  • $value

Redefined in descendants as:

Documentation generated by phpDocumentor 1.4.0