Example #1
0
 function __construct($registry)
 {
     $this->registry = $registry;
     $config = new Config($this->registry);
     $this->defaultConnection = $config->getDefaultDBConnection();
     $dbData = $config->getDBConfig();
     foreach ($dbData as $key => $value) {
         $connections[$key] = "mysql://" . $value['USER'] . ":" . $value['PASS'] . "@" . $value['HOST'] . (isset($value['PORT']) ? ":" . $value['PORT'] : NULL) . "/" . $value['NAME'];
     }
     $this->connections = $connections;
     require $config->getORMPath();
     $this->invokeModel();
 }