indigophp/fuel-dbal

This package is abandoned and no longer maintained. No replacement package was suggested.

Fuel DBAL integration

dev-develop 2014-09-21 02:00 UTC

This package is not auto-updated.

Last update: 2019-02-20 18:08:48 UTC


README

Build Status Latest Stable Version Total Downloads License Dependency Status

This package is a wrapper around doctrine/dbal package.

Install

Via Composer

{
    "require": {
        "indigophp/fuel-dbal": "@stable"
    }
}

Usage

You can use the fuel db configuration or you can place your configuration in dbal. dbal is checked first and it must be in DBAL compatible format, only the legacy db configurations are converted.

// Returns a DBAL Connection object
$conn \Dbal::forge('default');

Dbal class extends Facade and uses Facade\Instance from indigophp/fuel-core.

Configuration

	'dbname'       => 'database'
	'host'         => 'localhost'
	'port'         => 1234
	'user'         => 'user',
	'password'     => 'secret',
	'driver'       => 'pdo_mysql',
	'driver_class' => 'MyNamespace\\MyDriverImpl', // the DBAL driverClass option
	'options'      => array( // the DBAL driverOptions option
	    'foo' => 'bar',
	),
	'path'             => '',
	'wrapper_class'    => 'MyDoctrineDbalConnectionWrapper', // the DBAL wrapperClass option
	'charset'          => 'UTF8',
	'profiling'        => true,
	'mapping_types'    => array(
	    'enum' => 'string',
	),
	'types' => array(
	    'custom' => 'MyCustomType',
	),

Profiling

No configuration is required beyond enabling profiling for your connection. Queries sent through DBAL will automatically appear in the Fuel profiler.

Note: You can use the package even without loading it since composer handles autoloading.

Testing

$ codecept run

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.