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