You are here

public function FeedImportSQLHashes::get in Feed Import 7.3

Returns an array of entity keyed by hash, using generated hashes.

Return value

array An array containing entity ids keyed by hash.

Overrides FeedImportHashManager::get

File

feed_import_base/inc/feed_import.inc, line 1849
This file contains Feed Import helpers.

Class

FeedImportSQLHashes
This class implements SQL hash storage

Code

public function get() {
  if (!$this->generatedHashes) {
    return array();
  }

  // Get select conditions (reuse same select object).
  $cond =& $this->select
    ->conditions();

  // Remove last condition.
  array_pop($cond);

  // Return hashes.
  $hashes = $this->select
    ->condition('hash', $this->generatedHashes, 'IN')
    ->execute()
    ->fetchAllAssoc('hash');
  $this->generatedHashes = array();
  return $hashes;
}