FeedsSourceCrawler.inc in Feeds Crawler 6
File
FeedsSourceCrawler.inc
View source
<?php
feeds_include('FeedsConfigurable');
feeds_include('FeedsSource');
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;
}
}