aboutsummaryrefslogblamecommitdiffhomepage
path: root/application/config/ConfigIO.php
blob: be78b1c71cf52a798198cdfa44c9f5220b9bc9f8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                    
                                    






                                                           
                                            





                                                          
                                   
 
<?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.
     */
    public function read($filepath);

    /**
     * Write configuration.
     *
     * @param string $filepath Config file absolute path.
     * @param array  $conf   All configuration in an array.
     */
    public function write($filepath, $conf);

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