class MailhandlerFetcherResult in Mailhandler 7.2
Definition of the import batch object needed by MailhandlerFetcher.
Hierarchy
- class \FeedsResult
- class \FeedsFetcherResult
- class \MailhandlerFetcherResult
- class \FeedsFetcherResult
Expanded class hierarchy of MailhandlerFetcherResult
File
- plugins/
feeds/ plugins/ MailhandlerFetcher.class.php, line 11 - Checks for new messages in a mailbox (IMAP, POP3, etc...).
View source
class MailhandlerFetcherResult extends FeedsFetcherResult {
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 |
---|---|---|---|---|
FeedsFetcherResult:: |
protected | property | The path to a file where the raw data is stored. | |
FeedsFetcherResult:: |
protected | property | The raw fetched data. | |
FeedsFetcherResult:: |
protected | function | Checks that a file exists and is readable. | |
FeedsFetcherResult:: |
public | function | Constructs file name for saving the raw data. | |
FeedsFetcherResult:: |
public | function | Returns if the file to parse exists. | |
FeedsFetcherResult:: |
public | function | Returns directory for storing files that are in progress of import. | |
FeedsFetcherResult:: |
public | function | Returns the contents of a file, if it exists. | |
FeedsFetcherResult:: |
public | function | Get a path to a temporary file containing the resource provided by the fetcher. | 1 |
FeedsFetcherResult:: |
public | function | Returns if raw data exists. | |
FeedsFetcherResult:: |
public | function | Sanitize the file in place. | |
FeedsFetcherResult:: |
public | function | Sanitize the raw content string. | |
FeedsFetcherResult:: |
public | function | Sanitize the raw content string. | |
FeedsFetcherResult:: |
public | function | Saves the raw fetcher result to a file. | |
FeedsFetcherResult:: |
public | function | Prevent saving the raw result when serializing object. | |
MailhandlerFetcherResult:: |
protected | property | ||
MailhandlerFetcherResult:: |
protected | property | ||
MailhandlerFetcherResult:: |
public | function |
Implementation of FeedsImportBatch::getRaw(); Overrides FeedsFetcherResult:: |
|
MailhandlerFetcherResult:: |
public | function |
Constructor. Overrides FeedsFetcherResult:: |