|
|
File: ../general-devel/lib/support/imap/cyrus/cyrus.class.php
phpGeneral - support
Cyrus
Imap | +-- Cyrus
Base class for cyrus imap specific classes
|
private class Cyrus extends Imap
Base class for cyrus imap specific classes
Includes specific operations necessary to connect to an cyrus imap server.
|
|
Direct known subclasses: ImapsCyrus, ImapCyrus
|
|
|
|
|
|
Private Field Summary |
integer |
$sock |
|
|
|
Public Method Details |
getAcl |
public boolean getAcl( string $path, array &$result, string &$errmsg )
|
|
Retrieves the ACLs for the given mailbox
Asks the imap server for the ACLs of a mailbox specified by $path andreturns the result as an array of ACLs in the &$result reference. TheACLs are strings containing the name of the user and his privileges inthis mailbox. Name and privileges are seperated by a space character andthe ACLs are concatenated characters. Each character represents a singleprivilege.
|
Parameter |
|
string |
$path |
|
|
path of the requested mailbox |
|
|
array |
&$result |
|
|
Reference where the retrieved ACLs are stored |
|
|
string |
&$errmsg |
|
|
Reference for storing error messages in case of a failure |
|
Returns |
boolean True on success, false otherwise |
|
setAcl |
public boolean setAcl( string $path, array $acl, string &$errmsg )
|
|
Sets ACLs for the given mailbox
Sets the ACLs of a mailbox specified by $path. The ACLs must be storedin an array and have to contain one or more strings with the name of theuser and his privileges in this mailbox. Name and privileges must beseperated by a space character.
|
Parameter |
|
string |
$path |
|
|
path of the mailbox |
|
|
array |
$acl |
|
|
Array of ACLs which should be set |
|
|
string |
&$errmsg |
|
|
Reference for storing error messages in case of a failure |
|
Returns |
boolean True on success, false otherwise |
|
deleteAcl |
public boolean deleteAcl( string $path, string $user, string &$errmsg )
|
|
Deletes an ACL in the given mailbox
Removes the ACL of an user and therefore his privileges on this mailbox.
|
Parameter |
|
string |
$path |
|
|
path of the mailbox |
|
|
string |
$user |
|
|
User whose ACLs should be deleted |
|
|
string |
&$errmsg |
|
|
Reference for storing error messages in case of a failure |
|
Returns |
boolean True on success, false otherwise |
|
|
Private Method Details |
Cyrus |
private object Cyrus Cyrus( array $param, string &$errmsg )
|
|
Class constructor
Iinitializes the base class.
|
Parameter |
|
array |
$param |
|
|
Associative array containing userid, password, realm and others |
|
|
string |
&$errmsg |
|
|
Reference for storing error messages in case of a failure |
|
Returns |
object Cyrus |
|
_Cyrus |
private void _Cyrus( )
|
|
Class destructor
Calls the base class destructor
|
Returns |
void |
|
rawOpen |
private boolean rawOpen( string $host, int $port, string $uid, string $password, string &$errmsg )
|
|
Opens a raw connection to the cyrus imap server
Connect to the cyrus imap server in raw mode and authenicate the givenuser.
|
Parameter |
|
string |
$host |
|
|
Host name or ip address of the cyrus imap server |
|
|
int |
$port |
|
|
Connect to this port on the host |
|
|
string |
$uid |
|
|
Connect by using this user name |
|
|
string |
$password |
|
|
Connect by using this password for the user |
|
|
string |
&$errmsg |
|
|
Reference for storing error messages in case of a failure |
|
Returns |
boolean True on success, false otherwise |
|
rawClose |
private boolean rawClose( )
|
|
Closes the raw connection to the cyrus imap server
Logs out of the cyrus imap server and closes the raw connection.
|
Returns |
boolean True on success, false otherwise |
|
rawSend |
private boolean rawSend( string $line, string &$result, string &$errmsg )
|
|
Sends a commond over the raw connection to the cyrus imap server
Sends a statment consisting of a command keyword followed by necessaryarguments to the cyrus imap server and returns true or false according tothe response of the server. If the server returns additional data, thenit is stored in the &$result parameter.
|
Parameter |
|
string |
$line |
|
|
String containing the command |
|
|
string |
&$result |
|
|
Reference where the answer returned by the server is stored |
|
|
string |
&$errmsg |
|
|
Reference for storing error messages in case of a failure |
|
Returns |
boolean True on success, false otherwise |
|
|
Private Field Details |
$sock |
private integer $sock
>> <<
|
|
|
|
|
|
PHPDoc 1.0beta |