- First push to add as a composer module
This commit is contained in:
commit
b7cd369c12
5 files changed
+183
No files matched your search
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
$path = dirname(__DIR__, 1);
|
||||
|
||||
return [
|
||||
'lean' => [
|
||||
'autoload' => [
|
||||
'lean.live',
|
||||
]
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
use Ulmus\ConnectionAdapter;
|
||||
|
||||
putenv('LEAN_API_PROJECT_PATH=' . $path = dirname(__DIR__, 2));
|
||||
|
||||
return [
|
||||
'lean.api' => [
|
||||
'picea' => [
|
||||
'context' => Lean\Api\View::class,
|
||||
|
||||
'view' => [
|
||||
[
|
||||
'path' => implode(DIRECTORY_SEPARATOR, [ $path , "view", '' ]),
|
||||
'order' => 99,
|
||||
],
|
||||
],
|
||||
|
||||
'asset' => [
|
||||
[
|
||||
'path' => implode(DIRECTORY_SEPARATOR, [ $path, "asset", '' ]),
|
||||
'order' => 10
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'ulmus' => [
|
||||
'entities' => [ 'Lean\\Api\\Entity' => implode(DIRECTORY_SEPARATOR, [ $path, 'src', 'Entity', '' ]) ],
|
||||
'adapters' => [
|
||||
DI\get('lean.api:storage'),
|
||||
]
|
||||
],
|
||||
|
||||
'tell' => [
|
||||
'json' => [
|
||||
[
|
||||
'path' => implode(DIRECTORY_SEPARATOR, [ $path, "meta", "i18n", "" ]),
|
||||
'order' => 99,
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
'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\ApplicationStrategy\NotFoundDecoratorInterface::class => DI\autowire(Lean\Api\ApplicationStrategy\NotFoundDecorator::class),
|
||||
Lean\ApplicationStrategy\MethodNotAllowedInterface::class => DI\autowire(Lean\Api\ApplicationStrategy\MethodNotAllowedDecorator::class),
|
||||
Lean\Api\Factory\MessageFactoryInterface::class => DI\autowire(Lean\Api\Lib\Message::class),
|
||||
Lean\Api\Factory\DebugFormFactoryInterface::class => DI\autowire(Lean\Api\Factory\DebugFormFactory::class),
|
||||
# League\Route\Strategy\ApplicationStrategy::class => DI\autowire(Lean\Api\ApplicationStrategy::class),
|
||||
];
|
||||
Reference in new issue
Block a user