You are here

class MailhandlerImportBatch in Mailhandler 6.2

Definition of the import batch object needed by MailhandlerFetcher.

Hierarchy

Expanded class hierarchy of MailhandlerImportBatch

File

plugins/feeds/plugins/MailhandlerFetcher.class.php, line 11
Checks for new messages in a mailbox (IMAP, POP3, etc...).

View source
class MailhandlerImportBatch extends FeedsImportBatch {
  protected $mailbox_name;
  protected $filter;

  /**
   * Constructor.
   */
  public function __construct($mailbox_name, $filter) {
    parent::__construct();
    $this->mailbox_name = $mailbox_name;
    $this->filter = $filter;
  }

  /**
   * Implementation of FeedsImportBatch::getRaw();
   */
  public function getRaw() {
    $mailbox = mailhandler_mailbox_load($this->mailbox_name);
    if ($class = mailhandler_plugin_load_class('mailhandler', $mailbox->settings['retrieve'], 'retrieve', 'handler')) {
      if ($messages = $class
        ->retrieve($mailbox, $this->filter)) {
        return array(
          'messages' => $messages,
          'mailbox' => $mailbox,
        );
      }
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FeedsBatch::$progress protected property
FeedsBatch::$total protected property
FeedsBatch::getProgress public function Report progress.
FeedsBatch::getTotal public function Get the total for a stage.
FeedsBatch::setProgress public function Set progress for a stage.
FeedsBatch::setTotal public function Set the total for a stage.
FeedsImportBatch::$created public property
FeedsImportBatch::$current_item protected property
FeedsImportBatch::$description public property
FeedsImportBatch::$feed_nid public property
FeedsImportBatch::$items public property
FeedsImportBatch::$link public property
FeedsImportBatch::$raw protected property
FeedsImportBatch::$title public property
FeedsImportBatch::$updated public property
FeedsImportBatch::addItem Deprecated public function Add an item.
FeedsImportBatch::currentItem public function
FeedsImportBatch::feedNode Deprecated public function
FeedsImportBatch::getDescription Deprecated public function
FeedsImportBatch::getFilePath public function 1
FeedsImportBatch::getItemCount Deprecated public function Get number of items.
FeedsImportBatch::getLink Deprecated public function
FeedsImportBatch::getTitle Deprecated public function
FeedsImportBatch::setDescription Deprecated public function Set description.
FeedsImportBatch::setItems Deprecated public function Set items.
FeedsImportBatch::setLink Deprecated public function Set link.
FeedsImportBatch::setTitle Deprecated public function Set title.
FeedsImportBatch::shiftItem public function @todo Move to a nextItem() based approach, not consuming the item array. Can only be done once we don't cache the entire batch object between page loads for batching anymore.
MailhandlerImportBatch::$filter protected property
MailhandlerImportBatch::$mailbox_name protected property
MailhandlerImportBatch::getRaw public function Implementation of FeedsImportBatch::getRaw(); Overrides FeedsImportBatch::getRaw
MailhandlerImportBatch::__construct public function Constructor. Overrides FeedsImportBatch::__construct