public function FeedsSource::load in Feeds 7.2
Same name and namespace in other branches
- 6 includes/FeedsSource.inc \FeedsSource::load()
- 7 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 982 - Definition of FeedsSourceInterface, FeedsState and FeedsSource class.
Class
- FeedsSource
- Holds the source of a feed to import.
Code
public function load() {
$record = db_query("SELECT imported, config, state, fetcher_result FROM {feeds_source} WHERE id = :id AND feed_nid = :nid", array(
':id' => $this->id,
':nid' => $this->feed_nid,
))
->fetchObject();
if ($record) {
// While FeedsSource cannot be exported, we still use CTool's export.inc
// export definitions.
ctools_include('export');
$this->export_type = EXPORT_IN_DATABASE;
$this->imported = $record->imported;
$this->config = unserialize($record->config);
if (!empty($record->state)) {
$this->state = unserialize($record->state);
}
if (!is_array($this->state)) {
$this->state = array();
}
if (!empty($record->fetcher_result)) {
$this->fetcher_result = unserialize($record->fetcher_result);
}
}
}