26 lines
548 B
PHP
26 lines
548 B
PHP
<?php
|
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
use Ulmus\ConnectionAdapter,
|
|
Ulmus\Container\AdapterProxy;
|
|
|
|
use LdapRecord\Connection;
|
|
|
|
return [
|
|
ConnectionAdapter::class => function($c) {
|
|
$adapter = new ConnectionAdapter('default', $c->get('config')['ulmus'], true);
|
|
$adapter->resolveConfiguration();
|
|
|
|
$adapter->connect();
|
|
|
|
return $adapter;
|
|
},
|
|
|
|
AdapterProxy::class => function (ContainerInterface $c) {
|
|
return new AdapterProxy(
|
|
$c->get(ConnectionAdapter::class)
|
|
);
|
|
}
|
|
];
|