public function FeedImportSQLHashes::insert in Feed Import 8
Inserts a new hash.
Parameters
integer $id: Entity id
mixed $hash: Unique hash coresponding to entity id
int $expire: Time to live
Overrides FeedImportHashManager::insert
File
- feed_import_base/
src/ FeedImportSQLHashes.php, line 117
Class
- FeedImportSQLHashes
- This class implements SQL hash storage
Namespace
Drupal\feed_import_baseCode
public function insert($id, $hash) {
$this->insertFormat[3] = $id;
$this->insertFormat[4] = $hash;
$this->insertFormat[5] = $this->ttl ? $this->ttl + time() : 0;
$this->insert
->values($this->insertFormat);
// Commit insert.
if (++$this->toInsert == $this->insertChunkSize) {
$this
->insertCommit();
}
}