You are here

class FeedsSourceCrawler in Feeds Crawler 6.2

Same name and namespace in other branches
  1. 6 FeedsSourceCrawler.inc \FeedsSourceCrawler

Hierarchy

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

Namesort descending Modifiers Type Description Overrides
FeedsConfigurable::$config protected property
FeedsConfigurable::$disabled protected property CTools export enabled status of this object.
FeedsConfigurable::$export_type protected property
FeedsConfigurable::$id protected property
FeedsConfigurable::addConfig public function Similar to setConfig but adds to existing configuration. 1
FeedsConfigurable::configFormSubmit public function Submission handler for configForm(). 3
FeedsConfigurable::copy public function Copy a configuration. 1
FeedsConfigurable::getConfig public function Implementation of getConfig(). 1
FeedsConfigurable::setConfig public function Set configuration. 1
FeedsConfigurable::__get public function Override magic method __get(). Make sure that $this->config goes through getConfig()
FeedsConfigurable::__isset public function Override magic method __isset(). This is needed due to overriding __get().
FeedsSource::$batch protected property
FeedsSource::$feed_nid protected property
FeedsSource::$importer protected property
FeedsSource::clear public function Remove all items from a feed.
FeedsSource::configDefaults public function Return defaults for feed configuration. Overrides FeedsConfigurable::configDefaults
FeedsSource::configForm public function Override parent::configForm(). Overrides FeedsConfigurable::configForm
FeedsSource::configFormValidate public function Override parent::configFormValidate(). Overrides FeedsConfigurable::configFormValidate
FeedsSource::delete public function Delete configuration. Removes configuration information from database, does not delete configuration itself.
FeedsSource::existing public function Only return source if configuration is persistent and valid. Overrides FeedsConfigurable::existing
FeedsSource::getConfigFor public function Convenience function. Returns the configuration for a specific class.
FeedsSource::instance public static function Instantiate a unique object per class/id/feed_nid. Don't use directly, use feeds_source() instead. Overrides FeedsConfigurable::instance
FeedsSource::load public function Load configuration and unpack.
FeedsSource::preview public function Preview = fetch and parse a feed.
FeedsSource::save public function Save configuration. Overrides FeedsConfigurable::save
FeedsSource::schedule public function Schedule this source.
FeedsSource::__construct protected function Constructor. Overrides FeedsConfigurable::__construct
FeedsSourceCrawler::getRaw public function
FeedsSourceCrawler::import public function Import a feed: execute fetching, parsing and processing stage. Overrides FeedsSource::import
FeedsSourceCrawler::setHTTPSource public function