<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
/**
* Connect to the supplied IMAP server and make sure the two mailboxes exist
*
- * @param string $host host to connect to
- * @param string $username authentication username
- * @param string $password authentication password
- * @param bool $ssl whether to use IMAP or IMAPS
- * @param string $folder name of the inbox folder
+ * @param string $host
+ * Host to connect to.
+ * @param string $username
+ * Authentication username.
+ * @param string $password
+ * Authentication password.
+ * @param bool $ssl
+ * Whether to use IMAP or IMAPS.
+ * @param string $folder
+ * Name of the inbox folder.
*
* @return \CRM_Mailing_MailStore_Imap
*/
- function __construct($host, $username, $password, $ssl = TRUE, $folder = 'INBOX') {
+ public function __construct($host, $username, $password, $ssl = TRUE, $folder = 'INBOX') {
// default to INBOX if an empty string
if (!$folder) {
$folder = 'INBOX';
$this->_transport->authenticate($username, $password);
$this->_transport->selectMailbox($folder);
- $this->_ignored = implode($this->_transport->getHierarchyDelimiter(), array($folder, 'CiviMail', 'ignored'));
+ $this->_ignored = implode($this->_transport->getHierarchyDelimiter(), array($folder, 'CiviMail', 'ignored'));
$this->_processed = implode($this->_transport->getHierarchyDelimiter(), array($folder, 'CiviMail', 'processed'));
- $boxes = $this->_transport->listMailboxes();
+ $boxes = $this->_transport->listMailboxes();
if ($this->_debug) {
print 'mailboxes found: ' . implode(', ', $boxes) . "\n";
/**
* Expunge the messages marked for deletion, CRM-7356
*/
- function expunge() {
+ public function expunge() {
$this->_transport->expunge();
}
/**
* Move the specified message to the ignored folder
*
- * @param integer $nr number of the message to move
+ * @param int $nr
+ * Number of the message to move.
*
* @return void
*/
- function markIgnored($nr) {
+ public function markIgnored($nr) {
if ($this->_debug) {
print "setting $nr as seen and moving it to the ignored mailbox\n";
}
/**
* Move the specified message to the processed folder
*
- * @param integer $nr number of the message to move
+ * @param int $nr
+ * Number of the message to move.
*
* @return void
*/
- function markProcessed($nr) {
+ public function markProcessed($nr) {
if ($this->_debug) {
print "setting $nr as seen and moving it to the processed mailbox\n";
}
$this->_transport->delete($nr);
}
}
-