abstract class FeedImportHashManager in Feed Import 8
Class which provides methods to manage hashes.
Hierarchy
- class \Drupal\feed_import_base\FeedImportConfigurable
- class \Drupal\feed_import_base\FeedImportHashManager implements FeedImportStaticHashManager
Expanded class hierarchy of FeedImportHashManager
File
- feed_import_base/
src/ FeedImportHashManager.php, line 7
Namespace
Drupal\feed_import_baseView source
abstract class FeedImportHashManager extends FeedImportConfigurable implements FeedImportStaticHashManager {
// Expire entities.
protected $ttl = 0;
// Generated hashes.
protected $generatedHashes = array();
// Item is marked as protected for updates.
const MARK_PROTECTED = 1;
/**
* Constructor.
*/
public abstract function __construct($entity_name, $feed_machine_name);
/**
* Returns an array of entity keyed by hash,
* using generated hashes.
*
* @return array
* An array containing entity ids keyed by hash.
*/
public abstract function get();
/**
* Inserts a new hash.
*
* @param integer $id
* Entity id
* @param mixed $hash
* Unique hash coresponding to entity id
* @param int $expire
* Time to live
*/
public abstract function insert($id, $hash);
/**
* Commits the insert to storage.
*/
public abstract function insertCommit();
/**
* Updates hashes.
*
* @param integer $id
* Hash id
* @param int $expire
* Time to live
*/
public abstract function update($id);
/**
* Protects a hash for updates
*
* @param integer $id
* Hash id
*/
public abstract function protect($id);
/**
* Commits the update to storage.
*/
public abstract function updateCommit();
/**
* Creates a hash, based on uniq
* Also adds it on generated hashes
*
* @param mixed $uniq
* Unique identifier.
*
* @return string
* A hash for specified identifier.
*/
public abstract function hash(&$uniq);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedImportConfigurable:: |
protected | property | ||
FeedImportConfigurable:: |
public static | function | Helper function to get lines of a string | |
FeedImportConfigurable:: |
public | function | Sets options for this instance | 4 |
FeedImportHashManager:: |
protected | property | ||
FeedImportHashManager:: |
protected | property | ||
FeedImportHashManager:: |
abstract public | function | Returns an array of entity keyed by hash, using generated hashes. | 1 |
FeedImportHashManager:: |
abstract public | function | Creates a hash, based on uniq Also adds it on generated hashes | 1 |
FeedImportHashManager:: |
abstract public | function | Inserts a new hash. | 1 |
FeedImportHashManager:: |
abstract public | function | Commits the insert to storage. | 1 |
FeedImportHashManager:: |
constant | |||
FeedImportHashManager:: |
abstract public | function | Protects a hash for updates | 1 |
FeedImportHashManager:: |
abstract public | function | Updates hashes. | 1 |
FeedImportHashManager:: |
abstract public | function | Commits the update to storage. | 1 |
FeedImportHashManager:: |
abstract public | function | Constructor. | 1 |
FeedImportStaticHashManager:: |
public static | function | Deletes hashes from database. | 1 |
FeedImportStaticHashManager:: |
public static | function | Deletes all hashes for specified feed name | 1 |
FeedImportStaticHashManager:: |
public static | function | Deletes all hashes of specified group | 1 |
FeedImportStaticHashManager:: |
public static | function | Deletes entities by type and id | 1 |
FeedImportStaticHashManager:: |
public static | function | Returns an array of expired entity ids keyed by entity name | 1 |
FeedImportStaticHashManager:: |
public static | function | Reschedules all entities | 1 |
FeedImportStaticHashManager:: |
public static | function | Returns total number of hashes for desired feeds. | 1 |