A league/container service provider for Spot ORM.
composer require laasti/spot-provider
$config = [
'name' => 'default', //required
//String DSN
'dsn' => '',
//OR, full array
'adapter' => '',
'host' => '', //required
'dbname' => '', //required
'user' => '', //required
'password' => '', //required
'port' => '',
'protocol' => '',
'socket' => '',
'dbsyntax' => '',
];
$container = new League\Container\Container();
$container->add('config.connections', [
[
'name' => 'default',
//...
]
]);
$container->addServiceProvider('Laasti\SpotProvider\SpotProvider');
$container->get('Spot\Locator');//OR, $container->get('spot.locator.default');
$container->add('Acme\MyMapper')->withArguments(['Spot\Locator']);
$container->add('Acme\MyMsSqlMapper')->withArguments(['spot.locator.mssql']);
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
See CHANGELOG.md for more information.
Author: Sonia Marquette (@nebulousGirl)
Released under the MIT License. See LICENSE.txt file.