Modules/Groupware/Email/ImapHelper.php
\Conjoon_Modules_Groupware_Email_ImapHelper
Package: Default
- Author
- Thorsten Suckow-Homberg
Properties
Methods

getFolderDelimiterForImapAccount(
\Conjoon_Modules_Groupware_Email_Account_Dto $account
)
:
String
static
Returns the delimiter for the specified account. If the account is not using the IMAP protocol, an exception will be thrown.
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $account | \Conjoon_Modules_Groupware_Email_Account_Dto |
| Type | Description |
|---|---|
| String |
| Exception | Description |
|---|---|
| \Conjoon_Modules_Groupware_Email_Exception | if the account is not an IMAP account, or if a connection to the host specified in the account could not be established or if no delim could be found |

reuseImapProtocolForAccount(
\Conjoon_Modules_Groupware_Email_Account_Dto $account
)
:
\Zend_Mail_Protocol_Imap
static
Checks whether there is already an opened connection for this account and returns it, or establishes a new connection if not found.
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $account | \Conjoon_Modules_Groupware_Email_Account_Dto |
| Type | Description |
|---|---|
| \Zend_Mail_Protocol_Imap |
| Exception | Description |
|---|---|
| \Conjoon_Modules_Groupware_Email_Exception | if no connection could be established for the specified account, or if the specified account does not use the IMAP protocol |

transformToFolderDto(
\Zend_Mail_Storage_Folder $folder, boolean $lookupStandardNames
=
false, array $config
=
array()
)
:
\Conjoon_Modules_Groupware_Email_Folder_Dto
static
Transforms an imap Zend_Mail_Storage_Folder to an instance of Conjoon_Modules_Groupware_Email_Folder_Dto.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $folder | \Zend_Mail_Storage_Folder | |
| $lookupStandardNames | boolean | Whether standard names like "INBOX" and trash should be looked up and addiotnal properties adjusted for them. |
| $config | array | A preset set of config properties which are used for the properties of the created FolderDto. By now, only the id, the idForPath and the pendingCount property are considered. |
| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Email_Folder_Dto |