3 namespace Drupal\locale;
6 * Defines the locale project storage interface.
8 interface LocaleProjectStorageInterface {
11 * Returns the stored value for a given key.
14 * The key of the data to retrieve.
15 * @param mixed $default
16 * The default value to use if the key is not found.
19 * The stored value, or the default value if no value exists.
21 public function get($key, $default = NULL);
24 * Returns a list of project records.
27 * A list of keys to retrieve.
30 * An associative array of items successfully returned, indexed by key.
32 public function getMultiple(array $keys);
35 * Creates or updates the project record.
38 * The key of the data to store.
42 public function set($key, $value);
45 * Creates or updates multiple project records.
48 * An associative array of key/value pairs.
50 public function setMultiple(array $data);
53 * Deletes project records for a given key.
56 * The key of the data to delete.
58 public function delete($key);
61 * Deletes multiple project records.
64 * A list of item names to delete.
66 public function deleteMultiple(array $keys);
69 * Returns all the project records.
72 * An associative array of items successfully returned, indexed by key.
74 public function getAll();
77 * Deletes all projects records.
80 * An associative array of items successfully returned, indexed by key.
82 public function deleteAll();
85 * Mark all projects as disabled.
87 public function disableAll();
90 * Resets the project storage cache.
92 public function resetCache();
95 * Returns the count of project records.
98 * The number of saved items.
100 public function countProjects();