1 | <?php |
||
23 | class ConfigCollection |
||
24 | { |
||
25 | /** @type int NONE no flag */ |
||
26 | const NONE = 0; |
||
27 | /** @type int OVERWRITE overwrite existing nodes by default */ |
||
28 | const OVERWRITE = 1; |
||
29 | /** @type int FLATTEN flatten nodes by default */ |
||
30 | const FLATTEN = 2; |
||
31 | |||
32 | |||
33 | /** @type array configuration flags */ |
||
34 | public $configFlags = [ |
||
35 | "disabled" => false // always false |
||
36 | ]; |
||
37 | /** @type array configuration content */ |
||
38 | public $content = []; |
||
39 | |||
40 | |||
41 | /** |
||
42 | * Adds a piece into configuration compilation |
||
43 | * |
||
44 | * @param string $uConfig configuration |
||
45 | * @param int $uLoadingFlags loading flags |
||
46 | * |
||
47 | * @return void |
||
48 | */ |
||
49 | public function add($uConfig, $uLoadingFlags = self::NONE) |
||
53 | |||
54 | /** |
||
55 | * Sets a configuration flag |
||
56 | * |
||
57 | * @param string $uName name of the configuration flag |
||
58 | * @param bool $uValue value |
||
59 | * |
||
60 | * @return void |
||
61 | */ |
||
62 | public function setFlag($uName, $uValue) |
||
66 | |||
67 | /** |
||
68 | * Returns route information in order to store it |
||
69 | * |
||
70 | * @return array |
||
71 | */ |
||
72 | public function save() |
||
76 | |||
77 | /** |
||
78 | * Processes the configuration file in order to simplify its accessibility |
||
79 | * |
||
80 | * @param mixed $uTarget target reference |
||
81 | * @param mixed $uNode source object |
||
82 | * @param int $uLoadingFlags loading flags |
||
83 | * |
||
84 | * @return void |
||
85 | */ |
||
86 | protected function process(&$uTarget, $uNode, $uLoadingFlags) |
||
151 | } |
||
152 |