You are here

public function FeedsSource::load in Feeds 7

Same name and namespace in other branches
  1. 6 includes/FeedsSource.inc \FeedsSource::load()
  2. 7.2 includes/FeedsSource.inc \FeedsSource::load()

Load configuration and unpack.

@todo Patch CTools to move constants from export.inc to ctools.module.

1 call to FeedsSource::load()
FeedsSource::__construct in includes/FeedsSource.inc
Constructor.

File

includes/FeedsSource.inc, line 258
Definition of FeedsSourceInterface and FeedsSource class.

Class

FeedsSource
This class encapsulates a source of a feed. It stores where the feed can be found and how to import it.

Code

public function load() {
  if ($record = db_query("SELECT config, batch FROM {feeds_source} WHERE id = :id AND feed_nid = :nid", array(
    ':id' => $this->id,
    ':nid' => $this->feed_nid,
  ))
    ->fetch()) {

    // While FeedsSource cannot be exported, we still use CTool's export.inc
    // export definitions.
    ctools_include('export');
    $this->export_type = EXPORT_IN_DATABASE;
    $this->config = unserialize($record->config);
    $this->batch = unserialize($record->batch);
  }
}