- Added the application feature - a big reason why Lean was created in the first place.
- Began moving some repetitive parts from projects to projects into lean
This commit is contained in:
1 parent
4bd68a74f8
commit
bdb9f7f732
13 files changed
+571
-2
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use function DI\autowire, DI\create, DI\get;
|
||||
|
||||
use Notes\Tell\LanguageHandler;
|
||||
|
||||
return [
|
||||
Tell\I18n::class => create( Tell\I18n::class ) ->constructor(
|
||||
get(Tell\Reader\JsonReader::class),
|
||||
get(Tell\Reader\PhpReader::class),
|
||||
getenv("DEBUG") ? create(Tell\PrintMissingKey::class) : get('tell.fallback')
|
||||
),
|
||||
|
||||
'tell.fallback' => function($c) {
|
||||
$tell = new Tell\I18n( $c->get(Tell\Reader\PhpReader::class) );
|
||||
$tell->locale = "en_US";
|
||||
|
||||
return $tell;
|
||||
},
|
||||
|
||||
# TODO -- accept folders from Lean Apps
|
||||
Tell\Reader\PhpReader::class => function($c) {
|
||||
return new Tell\Reader\PhpReader($c->get(Lean\Lean::class)->getI18n('php'), true);
|
||||
},
|
||||
|
||||
Tell\Reader\JsonReader::class => function($c) {
|
||||
return new Tell\Reader\JsonReader($c->get(Lean\Lean::class)->getI18n('json'), true);
|
||||
},
|
||||
|
||||
LanguageHandler::class => autowire(LanguageHandler::class),
|
||||
];
|
||||
Reference in new issue
Block a user