1: <?php
2:
3: namespace Charcoal\Config;
4:
5: /**
6: * Describes a configuration container / registry.
7: */
8: interface ConfigInterface extends
9: DelegatesAwareInterface,
10: EntityInterface,
11: FileAwareInterface,
12: SeparatorAwareInterface
13: {
14: /**
15: * Gets the default data.
16: *
17: * Pre-populates new configsets.
18: *
19: * @return array Key-value array of data
20: */
21: public function defaults();
22:
23: /**
24: * Adds new data, replacing / merging existing data with the same key.
25: *
26: * @param array|\Traversable $data Key-value array of data to merge.
27: * @return ConfigInterface Chainable
28: */
29: public function merge($data);
30:
31: /**
32: * Add a configuration file to the configset.
33: *
34: * @param string $path The file to load and add.
35: * @return ConfigInterface Chainable
36: */
37: public function addFile($path);
38: }
39: