public
Description: MVC framework for PHP and the Midgard content repository
Homepage: http://www.midgard-project.org/
Clone URL: git://github.com/bergie/midcom.git
midcom / midcom_core / services / configuration.php
100644 69 lines (62 sloc) 1.97 kb
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* @package midcom_core
* @author The Midgard Project, http://www.midgard-project.org
* @copyright The Midgard Project, http://www.midgard-project.org
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
*/
 
/**
* Configuration interface for MidCOM 3
*
* @package midcom_core
*/
interface midcom_core_services_configuration
{
    /**
* Loads the configuration system for a given component
*
* @param string $component Component to load configuration for
*/
    public function __construct($component, midgard_page $folder = null);
 
    /**
* Retrieve a configuration key
*
* If $key exists in the configuration data, its value is returned to the caller.
* If the value does not exist, an exception will be raised.
*
* @param string $key The configuration key to query.
* @return mixed Its value
* @see midcom_helper_configuration::exists()
*/
    public function get($key, $subkey = false);
 
    /**
* @see midcom_helper_configuration::get()
*/
    public function __get($key);
 
    /**
* Checks for the existence of a configuration key.
*
* @param string $key The configuration key to check for.
* @return boolean True, if the key is available, false otherwise.
*/
    public function exists($key);
 
    /**
* @see midcom_helper_configuration::exists()
*/
    public function __isset($key);
 
    /**
* Parses configuration string and returns it in configuration array format
*
* @param string $configuration Configuration string
* @return array The loaded configuration array
*/
    public function unserialize($configuration);
    
    /**
* Dumps configuration array and returns it as a string
*
* @param array $configuration Configuration array
* @return string Configuration in string format
*/
    public function serialize(array $configuration);
}
?>