bedd / doctrine-dbal-extensions
extensions for the doctrine dbal project
dev-master
2017-03-09 21:38 UTC
Requires
- php: >=5.5.0
Requires (Dev)
- ext-pdo: *
- doctrine/dbal: ~2.5
- phpunit/phpunit: ~4.8
This package is not auto-updated.
Last update: 2024-11-24 03:04:08 UTC
README
Installation
The best way to install this library is to use composer.
{ "require": { "bedd/doctrine-dbal-extensions": "1.*" } }
Usage
Getting a model
$config = new \Doctrine\DBAL\Configuration(); $connectionParams = array( // other params... like the access 'wrapperClass' => '\Bedd\Doctrine\Dbal\Connection', ); $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); //variant #1 (need the wrapperClass) $model1 = $conn->getModel('table_name'); //variant #2 (no need of the wrapperClass) $model2 = new \Bedd\Doctrine\Dbal\Model('table_name', $conn);``` ### Working with a model ```php //@todo
License
This library is available under the MIT license.