]>
Commit | Line | Data |
---|---|---|
59404d79 | 1 | <?php |
3c66e564 | 2 | namespace Shaarli\Config; |
59404d79 A |
3 | |
4 | /** | |
5 | * Interface ConfigIO | |
6 | * | |
7 | * This describes how Config types should store their configuration. | |
8 | */ | |
9 | interface ConfigIO | |
10 | { | |
11 | /** | |
12 | * Read configuration. | |
13 | * | |
14 | * @param string $filepath Config file absolute path. | |
15 | * | |
16 | * @return array All configuration in an array. | |
17 | */ | |
93b1fe54 | 18 | public function read($filepath); |
59404d79 A |
19 | |
20 | /** | |
21 | * Write configuration. | |
22 | * | |
23 | * @param string $filepath Config file absolute path. | |
24 | * @param array $conf All configuration in an array. | |
25 | */ | |
93b1fe54 | 26 | public function write($filepath, $conf); |
59404d79 A |
27 | |
28 | /** | |
29 | * Get config file extension according to config type. | |
30 | * | |
31 | * @return string Config file extension. | |
32 | */ | |
93b1fe54 | 33 | public function getExtension(); |
59404d79 | 34 | } |