You are here

interface LocaleProjectStorageInterface in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/locale/src/LocaleProjectStorageInterface.php \Drupal\locale\LocaleProjectStorageInterface

Defines the locale project storage interface.

Hierarchy

Expanded class hierarchy of LocaleProjectStorageInterface

All classes that implement LocaleProjectStorageInterface

File

core/modules/locale/src/LocaleProjectStorageInterface.php, line 13
Contains \Drupal\locale\LocaleProjectStorageInterface.

Namespace

Drupal\locale
View source
interface LocaleProjectStorageInterface {

  /**
   * Returns the stored value for a given key.
   *
   * @param string $key
   *   The key of the data to retrieve.
   * @param mixed $default
   *   The default value to use if the key is not found.
   *
   * @return mixed
   *   The stored value, or the default value if no value exists.
   */
  public function get($key, $default = NULL);

  /**
   * Returns a list of project records.
   *
   * @param array $keys
   *   A list of keys to retrieve.
   *
   * @return array
   *   An associative array of items successfully returned, indexed by key.
   */
  public function getMultiple(array $keys);

  /**
   * Creates or updates the project record.
   *
   * @param string $key
   *   The key of the data to store.
   * @param mixed $value
   *   The data to store.
   */
  public function set($key, $value);

  /**
   * Creates or updates multiple project records.
   *
   * @param array $data
   *   An associative array of key/value pairs.
   */
  public function setMultiple(array $data);

  /**
   * Deletes project records for a given key.
   *
   * @param string $key
   *   The key of the data to delete.
   */
  public function delete($key);

  /**
   * Deletes multiple project records.
   *
   * @param array $keys
   *   A list of item names to delete.
   */
  public function deleteMultiple(array $keys);

  /**
   * Returns all the project records.
   *
   * @return array
   *   An associative array of items successfully returned, indexed by key.
   */
  public function getAll();

  /**
   * Deletes all projects records.
   *
   * @return array
   *   An associative array of items successfully returned, indexed by key.
   */
  public function deleteAll();

  /**
   * Mark all projects as disabled.
   */
  public function disableAll();

  /**
   * Resets the project storage cache.
   */
  public function resetCache();

  /**
   * Returns the count of project records.
   *
   * @return int
   *   The number of saved items.
   */
  public function countProjects();

}

Members

Namesort descending Modifiers Type Description Overrides
LocaleProjectStorageInterface::countProjects public function Returns the count of project records. 1
LocaleProjectStorageInterface::delete public function Deletes project records for a given key. 1
LocaleProjectStorageInterface::deleteAll public function Deletes all projects records. 1
LocaleProjectStorageInterface::deleteMultiple public function Deletes multiple project records. 1
LocaleProjectStorageInterface::disableAll public function Mark all projects as disabled. 1
LocaleProjectStorageInterface::get public function Returns the stored value for a given key. 1
LocaleProjectStorageInterface::getAll public function Returns all the project records. 1
LocaleProjectStorageInterface::getMultiple public function Returns a list of project records. 1
LocaleProjectStorageInterface::resetCache public function Resets the project storage cache. 1
LocaleProjectStorageInterface::set public function Creates or updates the project record. 1
LocaleProjectStorageInterface::setMultiple public function Creates or updates multiple project records. 1