class FeedsFileBatch in Feeds 7
Same name and namespace in other branches
- 6 plugins/FeedsFileFetcher.inc \FeedsFileBatch
Definition of the import batch object created on the fetching stage by FeedsFileFetcher.
Hierarchy
- class \FeedsBatch
- class \FeedsImportBatch
- class \FeedsFileBatch
- class \FeedsImportBatch
Expanded class hierarchy of FeedsFileBatch
File
- plugins/
FeedsFileFetcher.inc, line 12 - Home of the FeedsFileFetcher and related classes.
View source
class FeedsFileBatch extends FeedsImportBatch {
/**
* Constructor.
*/
public function __construct($file_path, $feed_nid = 0) {
parent::__construct('', $feed_nid);
$this->file_path = $file_path;
}
/**
* Implements FeedsImportBatch::getRaw();
*/
public function getRaw() {
return file_get_contents($this->file_path);
}
/**
* Implements FeedsImportBatch::getFilePath().
*/
public function getFilePath() {
if (!file_exists($this->file_path)) {
throw new Exception(t('File @filepath is not accessible.', array(
'@filepath' => $this->file_path,
)));
}
return $this->file_path;
}
}
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. | |
FeedsFileBatch:: |
public | function |
Implements FeedsImportBatch::getFilePath(). Overrides FeedsImportBatch:: |
|
FeedsFileBatch:: |
public | function |
Implements FeedsImportBatch::getRaw(); Overrides FeedsImportBatch:: |
|
FeedsFileBatch:: |
public | function |
Constructor. Overrides FeedsImportBatch:: |
|
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
protected | property | 1 | |
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | function | Add an item. | |
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | Return the feed node related to this batch object. | |
FeedsImportBatch:: |
public | function | ||
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. |