class MailhandlerImportBatch in Mailhandler 6.2
Definition of the import batch object needed by MailhandlerFetcher.
Hierarchy
- class \FeedsBatch
- class \FeedsImportBatch
- class \MailhandlerImportBatch
- class \FeedsImportBatch
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsBatch:: |
protected | property | ||
FeedsBatch:: |
protected | property | ||
FeedsBatch:: |
public | function | Report progress. | |
FeedsBatch:: |
public | function | Get the total for a stage. | |
FeedsBatch:: |
public | function | Set progress for a stage. | |
FeedsBatch:: |
public | function | Set the total for a stage. | |
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | function | Add an item. | |
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | 1 | |
FeedsImportBatch:: |
public | function | Get number of items. | |
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | Set description. | |
FeedsImportBatch:: |
public | function | Set items. | |
FeedsImportBatch:: |
public | function | Set link. | |
FeedsImportBatch:: |
public | function | Set title. | |
FeedsImportBatch:: |
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:: |
protected | property | ||
MailhandlerImportBatch:: |
protected | property | ||
MailhandlerImportBatch:: |
public | function |
Implementation of FeedsImportBatch::getRaw(); Overrides FeedsImportBatch:: |
|
MailhandlerImportBatch:: |
public | function |
Constructor. Overrides FeedsImportBatch:: |