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

Comments

Projects
None yet
5 participants
@Kachit

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

This comment has been minimized.

Show comment
Hide comment
@mapirelli

mapirelli commented Oct 6, 2015

i like it

@sergeyklay sergeyklay added this to the 3.1.0 milestone Aug 11, 2016

@Jurigag

This comment has been minimized.

Show comment
Hide comment
@Jurigag

Jurigag Mar 1, 2017

Member

@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.

Member

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 referenced this issue Mar 1, 2017

Merged

Factory loaders #12670

3 of 3 tasks complete

@sergeyklay sergeyklay modified the milestones: 3.2.0, 3.1.0 Mar 2, 2017

@Jurigag

This comment has been minimized.

Show comment
Hide comment
@Jurigag

Jurigag Mar 28, 2017

Member

Implemented in 3.2.x

Member

Jurigag commented Mar 28, 2017

Implemented in 3.2.x

@sergeyklay sergeyklay closed this Mar 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment