aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/config/ConfigIO.php
blob: 4b1c990138e3c15a353822078e0968918a2ec16c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

/**
 * Interface ConfigIO
 *
 * This describes how Config types should store their configuration.
 */
interface ConfigIO
{
    /**
     * Read configuration.
     *
     * @param string $filepath Config file absolute path.
     *
     * @return array All configuration in an array.
     */
    function read($filepath);

    /**
     * Write configuration.
     *
     * @param string $filepath Config file absolute path.
     * @param array  $conf   All configuration in an array.
     *
     * @return bool True if the configuration has been successfully written, false otherwise.
     */
    function write($filepath, $conf);

    /**
     * Get config file extension according to config type.
     *
     * @return string Config file extension.
     */
    function getExtension();
}