1: <?php
2: /**
3: * Utility class for specifying scope-specific ansel configuration.
4: *
5: */
6: class Ansel_Config
7: {
8: protected $_config = array();
9:
10: /**
11: * Const'r - set the default scope to ansel.
12: *
13: */
14: public function __construct()
15: {
16: $this->_config['scope'] = 'ansel';
17: }
18:
19: public function set($config, $value)
20: {
21: $this->_config[$config] = $value;
22: }
23:
24: public function get($config)
25: {
26: if (!isset($this->_config[$config])) {
27: throw InvalidArgumentException($config . ' not found');
28: }
29: return $this->_config[$config];
30: }
31:
32: }