FeedsClientsFetcher.inc in Web Service Clients 7
Same filename and directory in other branches
Home of the FeedsFileFetcher.
File
clients/clients_feeds/FeedsClientsFetcher.incView source
<?php
/**
* @file
* Home of the FeedsFileFetcher.
*/
/**
* Fetches data via HTTP.
*/
class FeedsClientsFetcher extends FeedsFetcher {
/**
* Fetch a local resource.
*/
public function fetch(FeedsSource $source) {
$source_config = $source
->getConfig();
$resource = clients_resource_load((int) $source_config['FeedsClientsParser']['source']);
$result = clients_call($resource);
$items = isset($result[0]->data) ? $result[0]->data : array();
// (feeds > alpha9)
$batch = new FeedsImportBatch();
$batch
->setItems($items);
return $batch;
}
}
Classes
Name | Description |
---|---|
FeedsClientsFetcher | Fetches data via HTTP. |