- Lean's API WIP on forms and ApiRenderer

This commit is contained in:
Dave Mc Nicoll committed 2025-05-21 18:36:19 +00:00
1 parent 3ce356e1f2
commit 4d7053a9cb
30 files changed
+1003 -56

No files matched your search

+21 -3
View File
@@ -1,6 +1,8 @@
<?php
$path = dirname(__DIR__, 2);
use Ulmus\ConnectionAdapter;
putenv('LEAN_API_PROJECT_PATH=' . $path = dirname(__DIR__, 2));
return [
'lean.api' => [
@@ -22,6 +24,13 @@ return [
],
],
'ulmus' => [
'entities' => [ 'Lean\\Api\\Entity' => implode(DIRECTORY_SEPARATOR, [ $path, 'src', 'Entity', '' ]) ],
'adapters' => [
DI\get('lean.api:storage'),
]
],
'tell' => [
'json' => [
[
@@ -31,10 +40,19 @@ return [
]
],
/*'routes' => [
'routes' => [
'Lean\\Api\\Controller' => implode(DIRECTORY_SEPARATOR, [ $path, "src", "Controller", "" ]),
],*/
],
],
'lean.api:storage' => function($c) {
$adapter = new ConnectionAdapter('lean.api', $c->get('config')['ulmus'], false);
$adapter->resolveConfiguration();
return $adapter;
},
\Lean\Api\Factory\MessageFactoryInterface::class => DI\autowire(\Lean\Api\Lib\Message::class),
\League\Route\Strategy\ApplicationStrategy::class => DI\autowire(\Lean\Api\ApplicationStrategy::class),
\Lean\Api\Factory\DebugFormFactoryInterface::class => DI\autowire(\Lean\Api\Factory\DebugFormFactory::class),
];