Class IMAP_ACL

Description

Contains functions related to managing Access Control Lists.

$Horde: framework/IMAP/IMAP/ACL.php,v 1.2.12.15 2009/01/06 15:23:11 jan Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /IMAP/IMAP/ACL.php (line 17)


	
			
Direct descendents
Class Description
 class IMAP_ACL_rfc2086 Contains functions related to managing Access Control Lists on an IMAP server using RFC 2086.
Variable Summary
 PEAR_Error $_error
 array $_params
 boolean $_protected
 array $_rightsList
 boolean $_supported
Method Summary
 IMAP_ACL IMAP_ACL ([array $params = array()])
 boolean canEdit (string $folder, string $user)
 mixed createACL (string $folder, string $share_user, array $acl)
 mixed editACL (string $folder, string $share_user, array $acl)
 mixed &factory (string $driver, [array $params = array()])
 array getACL (string $folder)
 void getError ()
 void getProtected ()
 void getRights ()
 array getRightsTitles ()
 void isSupported ()
 mixed &singleton (string $driver, [array $params = array()])
Variables
PEAR_Error $_error = null (line 38)

Any PEAR_Error that occured but couldn't be returned directly.

array $_params = array() (line 24)

Hash containing connection parameters.

boolean $_protected (line 70)

Array containing user names that cannot have their access rights changed.

array $_rightsList = array() (line 50)

Hash containing the list of possible rights and a human readable description of each

Array ( right-id => right-description )

array $_rightsListTitles = array() (line 62)

Hash containing the list of possible rights and a human readable, short title of each

Array ( right-id => right-title )

boolean $_supported = false (line 31)

Boolean indicating if the driver is supported by the server

Methods
Constructor IMAP_ACL (line 77)

Constructor.

IMAP_ACL IMAP_ACL ([array $params = array()])
  • array $params: Hash containing connection parameters.
canEdit (line 146)

Can a user edit the ACL for this folder? Returns true if $user permission to edit the ACL on $folder

  • return: True if $user has 'a' right
boolean canEdit (string $folder, string $user)
  • string $folder: The folder name
  • string $user: A user name

Redefined in descendants as:
createACL (line 113)

Sets the ACL on an IMAP server

  • return: True on success, false on failure unless server doesn't support ACLs, returns 'no_support'
mixed createACL (string $folder, string $share_user, array $acl)
  • string $folder: The folder on which to edit the ACL
  • string $share_user: The user to grant rights to
  • array $acl: An array, the keys of which are the rights to be granted (see RFC 2086)

Redefined in descendants as:
editACL (line 131)

Edits an ACL on an IMAP server

  • return: True on success, false on failure unless server doesn't support ACLs, returns 'no_support'
mixed editACL (string $folder, string $share_user, array $acl)
  • string $folder: The folder on which to edit the ACL
  • string $share_user: The user to grant rights to
  • array $acl: An array, the keys of which are the rights to be granted (see RFC 2086)

Redefined in descendants as:
factory (line 196)

Attempts to return an ACL instance based on $driver.

  • return: The newly created concrete ACL instance, or false on error.
mixed &factory (string $driver, [array $params = array()])
  • string $driver: The type of concrete ACL subclass to return.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.
getACL (line 95)

Attempts to retrieve the existing ACL for a folder from the current IMAP server.

  • return: A hash containing information on the ACL Array ( user => Array ( right => 1 ) )
array getACL (string $folder)
  • string $folder: folder The folder to get the ACL for

Redefined in descendants as:
getError (line 179)
void getError ()
getProtected (line 169)
void getProtected ()
getRights (line 151)
void getRights ()
getRightsTitles (line 164)

Get list of possible rights and a human readable, short title of each.

  • return: Hash with right-ids as keys and titles as values.
  • since: Horde 3.2
array getRightsTitles ()
isSupported (line 174)
void isSupported ()
singleton (line 223)

Attempts to return a reference to a concrete ACL instance based on $driver. It will only create a new instance if no ACL instance with the same parameters currently exists.

This method must be invoked as: $var = &IMAP_ACL::singleton()

  • return: The created concrete ACL instance, or false on error.
mixed &singleton (string $driver, [array $params = array()])
  • string $driver: The type of concrete ACL subclass to return.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.

Documentation generated on Sun, 30 Jan 2011 05:14:57 +0000 by phpDocumentor 1.4.3