- WIP on moving config and definition loading into composer

This commit is contained in:
mcndave committed 2023-11-15 19:10:30 -05:00
1 parent 2378245dbf
commit 60d4c7a900
5 files changed
+74 -2

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
<?php
return [
'ulmus' => [
'connections' => [
'sqlite' => [
'adapter' => 'SQLite',
'path' => getenv('PROJECT_PATH') . DIRECTORY_SEPARATOR . "var/lean.sqlite3",
'pragma_begin' => "journal_mode=WAL",
'pragma_close' => "analysis_limit=500,optimize",
],
],
],
];
+8
View File
@@ -1,5 +1,6 @@
<?php
use Taxus\Privilege;
use function DI\autowire, DI\create, DI\get;
use TheBugs\JavascriptMiddleware;
@@ -64,6 +65,13 @@ return [
'routes' => [],
'cronard' => [],
'taxus' => [
[ new Privilege("dev", "Is a developper of this application."), "is_dev" ],
[ new Privilege("admin", "Can manage mostly everything from this application."), "is_admin" ],
[ new Privilege("user", "Is an authenticated user."), "is_user" ],
[ new Privilege("anonymous", "Is an anonymous (unauthenticated) user."), "is_anonymous" ],
]
],
Lean::class => autowire(Lean::class),
+19
View File
@@ -0,0 +1,19 @@
<?php
use Psr\Container\ContainerInterface;
use Ulmus\ConnectionAdapter,
Ulmus\Container\AdapterProxy;
use Storage\Session;
use function DI\autowire, DI\create, DI\get;
return [
'lean:adapter.sqlite' => function($c) {
$adapter = new ConnectionAdapter('sqlite', $c->get('config')['ulmus'], true);
$adapter->resolveConfiguration();
return $adapter;
}
];