class FeedsSourceCrawler in Feeds Crawler 6.2
Same name and namespace in other branches
- 6 FeedsSourceCrawler.inc \FeedsSourceCrawler
Hierarchy
- class \FeedsConfigurable
- class \FeedsSource
- class \FeedsSourceCrawler
- class \FeedsSource
Expanded class hierarchy of FeedsSourceCrawler
3 string references to 'FeedsSourceCrawler'
- feeds_crawler_admin_form in ./
feeds_crawler.admin.inc - feeds_crawler_batch in ./
feeds_crawler.module - Batch callback.
- feeds_crawler_reset_source_class in ./
feeds_crawler.module
File
- ./
FeedsSourceCrawler.inc, line 6
View source
class FeedsSourceCrawler extends FeedsSource {
public function import() {
try {
if (!isset($this->batch) || !$this->batch instanceof FeedsImportBatch) {
$this->batch = $this->importer->fetcher
->fetch($this);
$this->importer->parser
->parse($this->batch, $this);
module_invoke_all('feeds_after_parse', $this->importer, $this);
}
$this->raw = $this->batch
->getRaw();
$this->importer->processor
->process($this->batch, $this);
$result = $this->batch
->getProgress();
if ($result == FEEDS_BATCH_COMPLETE) {
unset($this->batch);
module_invoke_all('feeds_after_import', $this->importer, $this);
}
} catch (Exception $e) {
unset($this->batch);
throw $e;
}
return $result;
}
public function setHTTPSource($url) {
$this->config['FeedsHTTPFetcher']['source'] = $url;
}
public function getRaw() {
return $this->raw;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsConfigurable:: |
protected | property | ||
FeedsConfigurable:: |
protected | property | CTools export enabled status of this object. | |
FeedsConfigurable:: |
protected | property | ||
FeedsConfigurable:: |
protected | property | ||
FeedsConfigurable:: |
public | function | Similar to setConfig but adds to existing configuration. | 1 |
FeedsConfigurable:: |
public | function | Submission handler for configForm(). | 3 |
FeedsConfigurable:: |
public | function | Copy a configuration. | 1 |
FeedsConfigurable:: |
public | function | Implementation of getConfig(). | 1 |
FeedsConfigurable:: |
public | function | Set configuration. | 1 |
FeedsConfigurable:: |
public | function | Override magic method __get(). Make sure that $this->config goes through getConfig() | |
FeedsConfigurable:: |
public | function | Override magic method __isset(). This is needed due to overriding __get(). | |
FeedsSource:: |
protected | property | ||
FeedsSource:: |
protected | property | ||
FeedsSource:: |
protected | property | ||
FeedsSource:: |
public | function | Remove all items from a feed. | |
FeedsSource:: |
public | function |
Return defaults for feed configuration. Overrides FeedsConfigurable:: |
|
FeedsSource:: |
public | function |
Override parent::configForm(). Overrides FeedsConfigurable:: |
|
FeedsSource:: |
public | function |
Override parent::configFormValidate(). Overrides FeedsConfigurable:: |
|
FeedsSource:: |
public | function | Delete configuration. Removes configuration information from database, does not delete configuration itself. | |
FeedsSource:: |
public | function |
Only return source if configuration is persistent and valid. Overrides FeedsConfigurable:: |
|
FeedsSource:: |
public | function | Convenience function. Returns the configuration for a specific class. | |
FeedsSource:: |
public static | function |
Instantiate a unique object per class/id/feed_nid. Don't use
directly, use feeds_source() instead. Overrides FeedsConfigurable:: |
|
FeedsSource:: |
public | function | Load configuration and unpack. | |
FeedsSource:: |
public | function | Preview = fetch and parse a feed. | |
FeedsSource:: |
public | function |
Save configuration. Overrides FeedsConfigurable:: |
|
FeedsSource:: |
public | function | Schedule this source. | |
FeedsSource:: |
protected | function |
Constructor. Overrides FeedsConfigurable:: |
|
FeedsSourceCrawler:: |
public | function | ||
FeedsSourceCrawler:: |
public | function |
Import a feed: execute fetching, parsing and processing stage. Overrides FeedsSource:: |
|
FeedsSourceCrawler:: |
public | function |