bedd/doctrine-dbal-extensions

extensions for the doctrine dbal project

dev-master 2017-03-09 21:38 UTC

This package is not auto-updated.

Last update: 2024-04-28 00:23:37 UTC


README

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality

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.