- Fixed SQLite truncate, added AdapterProxy autoloading

This commit is contained in:
Dave Mc Nicoll committed 2025-05-12 15:11:00 +00:00
1 parent 1ec582d1ac
commit 761e0401b0
7 files changed
+105 -6

No files matched your search

+16 -1
View File
@@ -2,12 +2,27 @@
namespace Ulmus\Container;
use Ulmus\ConnectionAdapter;
class AdapterProxy
{
public array $connections = [];
public function __construct(...$arguments)
{
$this->connections = $arguments;
$this->push(array_filter($arguments));
}
public function push(array|ConnectionAdapter $connection) : void
{
foreach((array) $connection as $adapter) {
foreach($this->connections as $existing) {
if ($adapter === $existing) {
continue 2;
}
}
$this->connections[] = $adapter;
}
}
}