27 lines
603 B
PHP
27 lines
603 B
PHP
<?php
|
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
use Ulmus\ConnectionAdapter,
|
|
Ulmus\Container\AdapterProxy;
|
|
|
|
use Storage\Session;
|
|
|
|
use function DI\autowire, DI\create, DI\get;
|
|
|
|
return [
|
|
ConnectionAdapter::class => function($c) {
|
|
$adapter = new ConnectionAdapter('default', $c->get('config')['ulmus'], true);
|
|
$adapter->resolveConfiguration();
|
|
|
|
return $adapter;
|
|
},
|
|
|
|
AdapterProxy::class => function (ContainerInterface $c) {
|
|
return new AdapterProxy(
|
|
$c->get('lean:adapter.sqlite'),
|
|
$c->get(ConnectionAdapter::class)
|
|
);
|
|
},
|
|
];
|