You are here

public function FeedsProcessor::itemCount in Feeds 7.2

Counts the number of items imported by this processor.

Return value

int The number of items imported by this processor.

File

plugins/FeedsProcessor.inc, line 791
Contains FeedsProcessor and related classes.

Class

FeedsProcessor
Abstract class, defines interface for processors.

Code

public function itemCount(FeedsSource $source) {
  return db_query("SELECT count(*) FROM {feeds_item} WHERE id = :id AND entity_type = :entity_type AND feed_nid = :feed_nid", array(
    ':id' => $this->id,
    ':entity_type' => $this
      ->entityType(),
    ':feed_nid' => $source->feed_nid,
  ))
    ->fetchField();
}