PluginProbe ʕ •ᴥ•ʔ
Backup Migration / 2.1.7
Backup Migration v2.1.7
2.1.7 2.1.6 2.1.5.2 trunk 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.6.1 1.4.7 1.4.8 1.4.9 1.4.9.1 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.5.1
backup-backup / analyst / src / Contracts / StorageContract.php
backup-backup / analyst / src / Contracts Last commit date
AnalystContract.php 2 weeks ago CacheContract.php 2 weeks ago HttpClientContract.php 2 weeks ago RequestContract.php 2 weeks ago RequestorContract.php 2 weeks ago StorageContract.php 2 weeks ago TrackerContract.php 2 weeks ago
StorageContract.php
41 lines
1 <?php
2
3 namespace Analyst\Contracts;
4
5 if ( ! defined( 'ABSPATH' ) ) exit;
6
7 /**
8 * Interface StorageContract
9 *
10 * Defines a simple key-value persistence layer.
11 * Implementations may use the database, filesystem, or any other backend.
12 */
13 interface StorageContract
14 {
15 /**
16 * Retrieve a value by key.
17 *
18 * @param string $key
19 * @param mixed $default
20 * @return mixed
21 */
22 public function get($key, $default = null);
23
24 /**
25 * Store a value under the given key.
26 *
27 * @param string $key
28 * @param mixed $value
29 * @return bool
30 */
31 public function put($key, $value);
32
33 /**
34 * Remove a value by key.
35 *
36 * @param string $key
37 * @return bool
38 */
39 public function delete($key);
40 }
41