You are here

interface FeedImportStaticHashManager in Feed Import 8

Static methods for hash manager

Hierarchy

Expanded class hierarchy of FeedImportStaticHashManager

All classes that implement FeedImportStaticHashManager

File

feed_import_base/src/FeedImportStaticHashManager.php, line 8

Namespace

Drupal\feed_import_base
View source
interface FeedImportStaticHashManager {

  /**
   * Deletes hashes from database.
   *
   * @param array $ids
   *    Hash ids to delete
   */
  public static function delete(array $ids);

  /**
   * Deletes entities by type and id
   *
   * @param int|array $ids
   *    Entity ids
   * @param string $entity_type
   *    Entity type
   */
  public static function deleteEntities($ids, $entity_type);

  /**
   * Deletes all hashes of specified group
   *
   * @param string $group
   *    Group name
   */
  public static function deleteByGroup($group);

  /**
   * Deletes all hashes for specified feed name
   *
   * @param string $name
   *    Feed machine name
   */
  public static function deleteByFeed($name);

  /**
   * Returns an array of expired entity ids keyed by entity name
   *
   * @param string $name
   *    Feed machine name
   * @param int $max
   *    Max number of ids or 0 for all
   * @return array
   *    An array of expired items. Format:
   *    entity_name:
   *      hash_id: enity_id
   */
  public static function getExpired($name, $max = 0);

  /**
   * Reschedules all entities
   *
   * @param string $name
   *    Feed machine name
   * @param int $ttl
   *    Time to live
   */
  public static function rescheduleAll($name, $ttl);

  /**
   * Returns total number of hashes for desired feeds.
   *
   * @param mixed $name
   *    The feed machine name (array for multiple) or NULL for all.
   * @return mixed $name
   *    Number of hashes (groupped by name for multiple)
   */
  public static function totalHashes($name = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
FeedImportStaticHashManager::delete public static function Deletes hashes from database. 1
FeedImportStaticHashManager::deleteByFeed public static function Deletes all hashes for specified feed name 1
FeedImportStaticHashManager::deleteByGroup public static function Deletes all hashes of specified group 1
FeedImportStaticHashManager::deleteEntities public static function Deletes entities by type and id 1
FeedImportStaticHashManager::getExpired public static function Returns an array of expired entity ids keyed by entity name 1
FeedImportStaticHashManager::rescheduleAll public static function Reschedules all entities 1
FeedImportStaticHashManager::totalHashes public static function Returns total number of hashes for desired feeds. 1