1 <?php namespace CupOfTea\EasyCfg\Contracts;
2
3 interface Provider
4 {
5
6 /**
7 * Get all Configuration values for a Configurable item.
8 *
9 * @param mixed $configurable
10 * @param mixed $configurable_id
11 * @return mixed
12 */
13 public function all($configurable = null, $configurable_id = null);
14
15 /**
16 * Get a Configuration value.
17 *
18 * @param string $key
19 * @param mixed $configurable
20 * @param mixed $configurable_id
21 * @return mixed
22 */
23 public function get($key, $configurable = null, $configurable_id = null);
24
25 /**
26 * Set a Configuration value.
27 *
28 * @param string $key
29 * @param mixed $value
30 * @param mixed $configurable
31 * @param mixed $configurable_id
32 * @return mixed
33 */
34 public function set($key, $value, $configurable = null, $configurable_id = null);
35
36 /**
37 * Delete a Configuration value.
38 *
39 * @param string $key
40 * @param mixed $configurable
41 * @param mixed $configurable_id
42 * @return int
43 */
44 public function delete($key, $configurable = null, $configurable_id = null);
45
46 /**
47 * Delete all Configuration data on a Configurable item.
48 *
49 * @param mixed $configurable
50 * @param mixed $configurable_id
51 * @return int
52 */
53 public function deleteAll($configurable = null, $configurable_id = null);
54
55 }
56