1 <?php
2 /**
3 * @package FrameworkOnFramework
4 * @subpackage config
5 * @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
6 * @license GNU General Public License version 2, or later
7 */
8
9 defined('FOF_INCLUDED') or die();
10
11 /**
12 * The Interface of an FOFConfigDomain class. The methods are used to parse and
13 * privision sensible information to consumers. FOFConfigProvider acts as an
14 * adapter to the FOFConfigDomain classes.
15 *
16 * @package FrameworkOnFramework
17 * @since 2.1
18 */
19 interface FOFConfigDomainInterface
20 {
21 /**
22 * Parse the XML data, adding them to the $ret array
23 *
24 * @param SimpleXMLElement $xml The XML data of the component's configuration area
25 * @param array &$ret The parsed data, in the form of a hash array
26 *
27 * @return void
28 */
29 public function parseDomain(SimpleXMLElement $xml, array &$ret);
30
31 /**
32 * Return a configuration variable
33 *
34 * @param string &$configuration Configuration variables (hashed array)
35 * @param string $var The variable we want to fetch
36 * @param mixed $default Default value
37 *
38 * @return mixed The variable's value
39 */
40 public function get(&$configuration, $var, $default);
41 }
42