- Added PPH-DI definition file
This commit is contained in:
1 parent
328a4d282c
commit
804deb69a2
2 files changed
+36
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use function DI\autowire, DI\create, DI\get;
|
||||
|
||||
use Picea\{ Method\Request };
|
||||
|
||||
use Picea\Extension\{ LanguageExtension, TitleExtension, NumberExtension, UrlExtension };
|
||||
|
||||
use Picea\Ui\{ Method, Ui };
|
||||
|
||||
return [
|
||||
Ui::class => autowire(Ui::class),
|
||||
|
||||
'picea.extensions' => function(\Psr\Container\ContainerInterface $c) {
|
||||
return array_merge([
|
||||
$c->get(LanguageExtension::class),
|
||||
$c->get(TitleExtension::class),
|
||||
$c->get(NumberExtension::class),
|
||||
$c->get(UrlExtension::class),
|
||||
$c->get(Method\Form::class),
|
||||
$c->get(Method\Pagination::class),
|
||||
$c->get(Request::class),
|
||||
], class_exists(\Taxus\Picea\Extension::class) ? [ $c->get(\Taxus\Picea\Extension::class) ] : [],
|
||||
array_map(fn($class) => $c->get($class), $c->get(Lean\Lean::class)->getPiceaExtensions())
|
||||
);
|
||||
},
|
||||
];
|
||||
Reference in new issue
Block a user