class FeedsFileBatch in Feeds 6
Same name and namespace in other branches
- 7 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 {
protected $file_path;
/**
* Constructor.
*/
public function __construct($file_path, $feed_nid = 0) {
$this->file_path = $file_path;
parent::__construct('', $feed_nid);
}
/**
* Implementation of FeedsImportBatch::getRaw();
*/
public function getRaw() {
return file_get_contents(realpath($this->file_path));
}
/**
* Implementation of 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:: |
protected | property | ||
FeedsFileBatch:: |
public | function |
Implementation of FeedsImportBatch::getFilePath(). Overrides FeedsImportBatch:: |
|
FeedsFileBatch:: |
public | function |
Implementation of FeedsImportBatch::getRaw(); Overrides FeedsImportBatch:: |
|
FeedsFileBatch:: |
public | function |
Constructor. Overrides FeedsImportBatch:: |
|
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 | 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. |