class FeedsFileFetcherResult in Feeds 8.2
Definition of the import batch object created on the fetching stage by FeedsFileFetcher.
Hierarchy
- class \Drupal\feeds\FeedsResult
- class \Drupal\feeds\FeedsFetcherResult
- class \Drupal\feeds\FeedsFileFetcherResult
- class \Drupal\feeds\FeedsFetcherResult
Expanded class hierarchy of FeedsFileFetcherResult
1 file declares its use of FeedsFileFetcherResult
- FeedsFileFetcher.php in lib/
Drupal/ feeds/ Plugin/ feeds/ fetcher/ FeedsFileFetcher.php - Home of the FeedsFileFetcher and related classes.
File
- lib/
Drupal/ feeds/ FeedsFileFetcherResult.php, line 16 - Home of the FeedsFileFetcher and related classes.
Namespace
Drupal\feedsView source
class FeedsFileFetcherResult extends FeedsFetcherResult {
/**
* Constructor.
*/
public function __construct($file_path) {
parent::__construct('');
$this->file_path = $file_path;
}
/**
* Overrides parent::getRaw().
*/
public function getRaw() {
return $this
->sanitizeRaw(file_get_contents($this->file_path));
}
/**
* Overrides parent::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
->sanitizeFile($this->file_path);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsFetcherResult:: |
protected | property | 1 | |
FeedsFetcherResult:: |
protected | property | ||
FeedsFetcherResult:: |
public | function | Sanitize the file in place. Currently supported sanitizations: | |
FeedsFetcherResult:: |
public | function | Sanitize the raw content string. Currently supported sanitizations: | |
FeedsFileFetcherResult:: |
public | function |
Overrides parent::getFilePath(). Overrides FeedsFetcherResult:: |
|
FeedsFileFetcherResult:: |
public | function |
Overrides parent::getRaw(). Overrides FeedsFetcherResult:: |
|
FeedsFileFetcherResult:: |
public | function |
Constructor. Overrides FeedsFetcherResult:: |