1: <?php
2:
3: namespace PHPixie\Bundles;
4:
5: class ORM
6: {
7: protected $configMap = array();
8: protected $wrappersMap = array();
9:
10: public function __construct($bundleRegistry)
11: {
12: foreach($bundleRegistry->bundles() as $bundle) {
13: if(!($bundle instanceof \PHPixie\Bundles\Bundle\Provides\ORM)) {
14: continue;
15: }
16:
17: $name = $bundle->name();
18:
19: $ormConfig = $bundle->ormConfig();
20: if($ormConfig !== null) {
21: $this->configMap[$name]= $ormConfig;
22: }
23:
24: $ormWrappers = $bundle->ormWrappers();
25: if($ormWrappers !== null) {
26: $this->wrappersMap[$name]= $ormWrappers;
27: }
28: }
29: }
30:
31: public function configMap()
32: {
33: return $this->configMap;
34: }
35:
36: public function wrappersMap()
37: {
38: return $this->wrappersMap;
39: }
40: }