scratch – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
115 | office | 1 | <?php |
2 | |||
3 | /* |
||
4 | * This file is part of Alchemy\BinaryDriver. |
||
5 | * |
||
6 | * (c) Alchemy <info@alchemy.fr> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace Alchemy\BinaryDriver; |
||
13 | |||
14 | interface ConfigurationInterface extends \ArrayAccess, \IteratorAggregate |
||
15 | { |
||
16 | /** |
||
17 | * Returns the value given a key from configuration |
||
18 | * |
||
19 | * @param string $key |
||
20 | * @param mixed $default The default value in case the key does not exist |
||
21 | * |
||
22 | * @return mixed |
||
23 | */ |
||
24 | public function get($key, $default = null); |
||
25 | |||
26 | /** |
||
27 | * Set a value to configuration |
||
28 | * |
||
29 | * @param string $key The key |
||
30 | * @param mixed $value The value corresponding to the key |
||
31 | */ |
||
32 | public function set($key, $value); |
||
33 | |||
34 | /** |
||
35 | * Tells if Configuration contains `$key` |
||
36 | * |
||
37 | * @param string $key |
||
38 | * |
||
39 | * @return Boolean |
||
40 | */ |
||
41 | public function has($key); |
||
42 | |||
43 | /** |
||
44 | * Removes a value given a key |
||
45 | * |
||
46 | * @param string $key |
||
47 | * |
||
48 | * @return mixed The previous value |
||
49 | */ |
||
50 | public function remove($key); |
||
51 | |||
52 | /** |
||
53 | * Returns all values set in the configuration |
||
54 | * |
||
55 | * @return array |
||
56 | */ |
||
57 | public function all(); |
||
58 | } |