30 lines
1.2 KiB
PHP
30 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Picea\{ Asset, Asset\Action, Language\LanguageRegistration, Ui\Ui };
|
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
use function DI\{get, autowire, create};
|
|
|
|
return [
|
|
Asset\Asset::class => autowire(Asset\Asset::class),
|
|
|
|
Asset\Config::class => fn(ContainerInterface $c) => new Asset\Config(
|
|
destination: $c->get('config')['picea']['asset']['symlink']['destination'],
|
|
path: $c->get('config')['picea']['asset']['path'],
|
|
),
|
|
|
|
Asset\FileFetcher::class => function($c) {
|
|
return new Asset\FileFetcher($c->get(Lean\Lean::class)->getAssetPaths());
|
|
},
|
|
|
|
Action\Install::class => autowire(Action\Install::class)->constructor(get(Action\InstallActionInterface::class), []),
|
|
|
|
Action\Symlink::class => autowire(Action\Symlink::class),
|
|
|
|
Action\InstallActionInterface::class => autowire(Action\Symlink::class),
|
|
|
|
LanguageRegistration::class => create(\Lean\PiceaDefaultRegistration::class)->constructor(get('picea.extensions'), [], [], get(Ui::class), get(Asset\Asset::class)),
|
|
|
|
\Picea\Extension\UrlExtension::class => create(Asset\Extension\UrlExtension::class)->constructor(get(Asset\Config::class), getenv("URL_BASE"), get('git.commit'), explode(',', getenv('APP_URL')), (bool) getenv('FORCE_SSL')),
|
|
]; |