Merge branch 'angular-tests' of https://github.com/giant-rabbit/civicrm-core into...
[civicrm-core.git] / CRM / Mailing / MailStore / Localdir.php
index fac20fc1e15669c3822794a02d085539f362e0ee..0fc7d476e4ad28f6e7abd83198c5447af4a9838d 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
 
 require_once 'ezc/Base/src/ezc_bootstrap.php';
 require_once 'ezc/autoload/mail_autoload.php';
+
+/**
+ * Class CRM_Mailing_MailStore_Localdir
+ */
 class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore {
 
   /**
    * Connect to the supplied dir and make sure the two mail dirs exist
    *
-   * @param string $dir  dir to operate upon
+   * @param string $dir dir to operate upon
    *
-   * @return void
+   * @return \CRM_Mailing_MailStore_Localdir
    */
-  function __construct($dir) {
+  public function __construct($dir) {
     $this->_dir = $dir;
 
     $this->_ignored = $this->maildir(implode(DIRECTORY_SEPARATOR, array('CiviMail.ignored', date('Y'), date('m'), date('d'))));
@@ -59,7 +63,7 @@ class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore {
    *
    * @return array      array of ezcMail objects
    */
-  function fetchNext($count = 0) {
+  public function fetchNext($count = 0) {
     $mails = array();
     $path = rtrim($this->_dir, DIRECTORY_SEPARATOR);
 
@@ -109,11 +113,12 @@ class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore {
   /**
    * Fetch the specified message to the local ignore folder
    *
-   * @param integer $file  file location of the message to fetch
+   * @param integer $file file location of the message to fetch
    *
+   * @throws Exception
    * @return void
    */
-  function markIgnored($file) {
+  public function markIgnored($file) {
     if ($this->_debug) {
       print "moving $file to ignored folder\n";
     }
@@ -126,11 +131,12 @@ class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore {
   /**
    * Fetch the specified message to the local processed folder
    *
-   * @param integer $file  file location of the message to fetch
+   * @param integer $file file location of the message to fetch
    *
+   * @throws Exception
    * @return void
    */
-  function markProcessed($file) {
+  public function markProcessed($file) {
     if ($this->_debug) {
       print "moving $file to processed folder\n";
     }
@@ -140,4 +146,3 @@ class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore {
     }
   }
 }
-