Backup of db before drupal security update
[yaffs-website] / web / core / modules / locale / src / LocaleProjectStorageInterface.php
1 <?php
2
3 namespace Drupal\locale;
4
5 /**
6  * Defines the locale project storage interface.
7  */
8 interface LocaleProjectStorageInterface {
9
10   /**
11    * Returns the stored value for a given key.
12    *
13    * @param string $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.
17    *
18    * @return mixed
19    *   The stored value, or the default value if no value exists.
20    */
21   public function get($key, $default = NULL);
22
23   /**
24    * Returns a list of project records.
25    *
26    * @param array $keys
27    *   A list of keys to retrieve.
28    *
29    * @return array
30    *   An associative array of items successfully returned, indexed by key.
31    */
32   public function getMultiple(array $keys);
33
34   /**
35    * Creates or updates the project record.
36    *
37    * @param string $key
38    *   The key of the data to store.
39    * @param mixed $value
40    *   The data to store.
41    */
42   public function set($key, $value);
43
44   /**
45    * Creates or updates multiple project records.
46    *
47    * @param array $data
48    *   An associative array of key/value pairs.
49    */
50   public function setMultiple(array $data);
51
52   /**
53    * Deletes project records for a given key.
54    *
55    * @param string $key
56    *   The key of the data to delete.
57    */
58   public function delete($key);
59
60   /**
61    * Deletes multiple project records.
62    *
63    * @param array $keys
64    *   A list of item names to delete.
65    */
66   public function deleteMultiple(array $keys);
67
68   /**
69    * Returns all the project records.
70    *
71    * @return array
72    *   An associative array of items successfully returned, indexed by key.
73    */
74   public function getAll();
75
76   /**
77    * Deletes all projects records.
78    *
79    * @return array
80    *   An associative array of items successfully returned, indexed by key.
81    */
82   public function deleteAll();
83
84   /**
85    * Mark all projects as disabled.
86    */
87   public function disableAll();
88
89   /**
90    * Resets the project storage cache.
91    */
92   public function resetCache();
93
94   /**
95    * Returns the count of project records.
96    *
97    * @return int
98    *   The number of saved items.
99    */
100   public function countProjects();
101
102 }