Ejemplo n.º 1
0
 public function register()
 {
     $dbConfig = $this->getConfig()->database->toArray();
     $default = $dbConfig['default'];
     $config = $dbConfig[$default];
     $adapter = '\\Phalcon\\Db\\Adapter\\Pdo\\' . $config['adapter'];
     $conn = new $adapter(Arr::except($config, 'adapter'));
     return $conn;
 }
Ejemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function add($key, $value)
 {
     Arr::add($this->configs, $key, $value);
     return $this;
 }