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; }
/** * @inheritdoc */ public function add($key, $value) { Arr::add($this->configs, $key, $value); return $this; }