Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add dynamic adapter loader by config #11001

Closed
Kachit opened this issue Oct 5, 2015 · 3 comments
Closed

Please add dynamic adapter loader by config #11001

Kachit opened this issue Oct 5, 2015 · 3 comments
Milestone

Comments

@Kachit
Copy link

Kachit commented Oct 5, 2015

For example:

$config = [
'adapter' => '{adapterName}',
'host' => 'host',
'user' => 'user',
//etc...
];

/* @var Phalcon\Db\Adapter\Pdo\{AdapterName} $dbAdapter*/
$dbAdapter = Phalcon\Db\Adapter\Pdo\Factory::load($config);

This feature actual for phalcon components with multiple adapters (db, sessions, cache etc)

@mapirelli
Copy link

i like it

@Jurigag
Copy link
Contributor

Jurigag commented Mar 1, 2017

@Kachit @mapirelli @sergeyklay

what $dbAdapter = Phalcon\Db\Adapter\Pdo\Factory::load($config); should return ? Phalcon\Db\Adapter\Pdo or Phalcon\Db\AdapterInterface? Well i guess AdapterInterface.

@Jurigag Jurigag mentioned this issue Mar 1, 2017
3 tasks
@sergeyklay sergeyklay modified the milestones: 3.2.0, 3.1.0 Mar 2, 2017
@Jurigag
Copy link
Contributor

Jurigag commented Mar 28, 2017

Implemented in 3.2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants