You are here

function _drush_feeds_get_all in Feeds 7.2

Returns all feed instances filtered by an optional importer.

Parameters

string $importer_id: (optional) The importer id.

int $limit: (optional) The number of feeds to return.

Return value

DatabaseStatementInterface A list of feeds objects.

2 calls to _drush_feeds_get_all()
drush_feeds_import_all in ./feeds.drush.inc
Imports all feeds.
drush_feeds_list_feeds in ./feeds.drush.inc
Lists all feeds.

File

./feeds.drush.inc, line 833
Drush commands for Feeds module.

Code

function _drush_feeds_get_all($importer_id = NULL, $limit = DRUSH_FEEDS_DEFAULT_LIMIT) {
  if (isset($importer_id)) {
    return db_query_range("SELECT * FROM {feeds_source} WHERE id = :importer ORDER BY imported ASC", 0, $limit, array(
      ':importer' => $importer_id,
    ));
  }
  return db_query_range("SELECT * FROM {feeds_source} ORDER BY imported ASC", 0, $limit);
}