Class IMAP_ACL_rfc2086

Description

Contains functions related to managing Access Control Lists on an IMAP server using RFC 2086.

Required parameters:

   'username'  The username for the server connection
   'password'  The password for the server connection
   'hostspec'  The hostname or IP address of the server.
               DEFAULT: 'localhost'
   'port'      The server port to which we will connect.
               IMAP is generally 143, while IMAP-SSL is generally 993.
               DEFAULT: 143
   'protocol'  The connection protocol (e.g. 'imap', 'pop3', 'nntp').
               Protocol is one of 'imap/notls' (or only 'imap' if you
               have a c-client version 2000c or older), 'imap/ssl', or
               'imap/ssl/novalidate-cert' (for a self-signed certificate).
               DEFAULT: 'imap'

$Horde: framework/IMAP/IMAP/ACL/rfc2086.php,v 1.6.8.27 2010-10-19 18:12:31 slusarz 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/rfc2086.php (line 31)

IMAP_ACL
   |
   --IMAP_ACL_rfc2086
Direct descendents
Class Description
 class IMAP_ACL_rfc4314 Contains functions related to managing Access Control Lists on an IMAP server using RFC 4314.
Variable Summary
 array $_caps
 resource $_imap
 resource $_internalImap
Method Summary
 IMAP_ACL_rfc2086 IMAP_ACL_rfc2086 ([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)
 array getACL (string $folder)
 void _connect ()
 mixed _internalLogin ()
Variables
array $_caps = array() (line 58)

List of server's capabilities, output of CAPABILITY command. Formated

as a hash

  1.  array(
  2.      *capability* => 1
  3.  )

resource $_imap (line 38)

IMAP resource.

resource $_internalImap (line 45)

Internal IMAP connection resource.

Inherited Variables

Inherited from IMAP_ACL

IMAP_ACL::$_error
IMAP_ACL::$_params
IMAP_ACL::$_protected
IMAP_ACL::$_rightsList
IMAP_ACL::$_rightsListTitles
IMAP_ACL::$_supported
Methods
Constructor IMAP_ACL_rfc2086 (line 65)

Constructor.

IMAP_ACL_rfc2086 IMAP_ACL_rfc2086 ([array $params = array()])
  • array $params: Any additional parameters this driver may need.
canEdit (line 354)

Can a user edit the ACL for this folder?

NB: if Auth_SASL is not installed this function will send the users password to the IMAP server as plain text!!

  • return: True if $user has permission to edit the ACL on $folder.
boolean canEdit (string $folder, string $user)
  • string $folder: The folder name.
  • string $user: A user name.

Redefinition of:
IMAP_ACL::canEdit()
Can a user edit the ACL for this folder? Returns true if $user permission to edit the ACL on $folder
createACL (line 146)

Sets the ACL on an IMAP server.

  • return: True on success, PEAR_Error on failure or if server doesn't support ACLs.
  • todo: Cleanup for PHP 5.
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).

Redefinition of:
IMAP_ACL::createACL()
Sets the ACL on an IMAP server
editACL (line 197)

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).

Redefinition of:
IMAP_ACL::editACL()
Edits an ACL on an IMAP server
getACL (line 271)

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

NB: if Auth_SASL is not installed this function will send the users password to the IMAP server as plain text!!

  • 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.

Redefinition of:
IMAP_ACL::getACL()
Attempts to retrieve the existing ACL for a folder from the current IMAP server.
_connect (line 115)
void _connect ()
_internalLogin (line 392)

Login to IMAP server.

  • return: PEAR_Error or resource.
mixed _internalLogin ()

Inherited Methods

Inherited From IMAP_ACL

 IMAP_ACL::IMAP_ACL()
 IMAP_ACL::canEdit()
 IMAP_ACL::createACL()
 IMAP_ACL::editACL()
 IMAP_ACL::factory()
 IMAP_ACL::getACL()
 IMAP_ACL::getError()
 IMAP_ACL::getProtected()
 IMAP_ACL::getRights()
 IMAP_ACL::getRightsTitles()
 IMAP_ACL::isSupported()
 IMAP_ACL::singleton()

Documentation generated on Sun, 30 Jan 2011 05:20:59 +0000 by phpDocumentor 1.4.3