You are here

class FeedsClientsFetcher in Web Service Clients 7

Same name and namespace in other branches
  1. 6 clients/clients_feeds/FeedsClientsFetcher.inc \FeedsClientsFetcher

Fetches data via HTTP.

Hierarchy

Expanded class hierarchy of FeedsClientsFetcher

2 string references to 'FeedsClientsFetcher'
clients_feeds_feeds_plugins in clients/clients_feeds/clients_feeds.module
Implementation of hook_feeds_plugins().
_clients_feeds_feeds_importer_default in clients/clients_feeds/clients_feeds.defaults.inc
Helper to implementation of hook_feeds_importer_default().

File

clients/clients_feeds/FeedsClientsFetcher.inc, line 10
Home of the FeedsFileFetcher.

View source
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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FeedsClientsFetcher::fetch public function Fetch a local resource.