aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/config/ConfigIO.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-05-18 21:43:59 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commit59404d7909b21682ec0782778452a8a70e38b25e (patch)
tree52bbe0b390ecd37f80128d1f8b4f80c3834734a8 /application/config/ConfigIO.php
parent823a363c3b2e10008a607c8b69c1a3d4e9b44ea1 (diff)
downloadShaarli-59404d7909b21682ec0782778452a8a70e38b25e.tar.gz
Shaarli-59404d7909b21682ec0782778452a8a70e38b25e.tar.zst
Shaarli-59404d7909b21682ec0782778452a8a70e38b25e.zip
Introduce a configuration manager (not plugged yet)
Diffstat (limited to 'application/config/ConfigIO.php')
-rw-r--r--application/config/ConfigIO.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/application/config/ConfigIO.php b/application/config/ConfigIO.php
new file mode 100644
index 00000000..2b68fe6a
--- /dev/null
+++ b/application/config/ConfigIO.php
@@ -0,0 +1,33 @@
1<?php
2
3/**
4 * Interface ConfigIO
5 *
6 * This describes how Config types should store their configuration.
7 */
8interface ConfigIO
9{
10 /**
11 * Read configuration.
12 *
13 * @param string $filepath Config file absolute path.
14 *
15 * @return array All configuration in an array.
16 */
17 function read($filepath);
18
19 /**
20 * Write configuration.
21 *
22 * @param string $filepath Config file absolute path.
23 * @param array $conf All configuration in an array.
24 */
25 function write($filepath, $conf);
26
27 /**
28 * Get config file extension according to config type.
29 *
30 * @return string Config file extension.
31 */
32 function getExtension();
33}