You are here

interface AcquiaPurgeStateStorageInterface in Acquia Purge 7

Describes a state storage object that maintains AcquiaPurgeStateItem objects.

Hierarchy

Expanded class hierarchy of AcquiaPurgeStateStorageInterface

All classes that implement AcquiaPurgeStateStorageInterface

File

lib/state/AcquiaPurgeStateStorageInterface.php, line 11
Contains AcquiaPurgeStateStorageInterface.

View source
interface AcquiaPurgeStateStorageInterface {

  /**
   * Commit the state data to its persistent storage location.
   */
  public function commit();

  /**
   * Retrieve the object named $key.
   *
   * @param int $key
   *   The key with which the object is stored in state storage.
   * @param mixed|null $default
   *   (optional) The default value to use if the entry doesn't yet exist.
   *
   * @return AcquiaPurgeStateItemInterface
   *   The item.
   */
  public function get($key, $default = NULL);

  /**
   * Retrieve a counter object named $key.
   *
   * @param int $key
   *   The key with which the object is stored in state storage.
   *
   * @return AcquiaPurgeStateCounterInterface
   *   The counter.
   */
  public function getCounter($key);

  /**
   * Store the state item in state item storage.
   *
   * @param AcquiaPurgeStateItemInterface $item
   *   The AcquiaPurgeStateItemInterface object to store.
   */
  public function set(AcquiaPurgeStateItemInterface $item);

  /**
   * Wipe all state data.
   */
  public function wipe();

}

Members

Namesort descending Modifiers Type Description Overrides
AcquiaPurgeStateStorageInterface::commit public function Commit the state data to its persistent storage location. 2
AcquiaPurgeStateStorageInterface::get public function Retrieve the object named $key. 1
AcquiaPurgeStateStorageInterface::getCounter public function Retrieve a counter object named $key. 1
AcquiaPurgeStateStorageInterface::set public function Store the state item in state item storage. 1
AcquiaPurgeStateStorageInterface::wipe public function Wipe all state data. 1