config
This commit is contained in:
20
app_old/ui/setups/01_views.php
Normal file
20
app_old/ui/setups/01_views.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
return [
|
||||
Slim\Views\Blade::class => function(ContainerInterface $container) {
|
||||
$folders = $container->get('folders');
|
||||
return new Slim\Views\Blade(
|
||||
$folders->get('templates'),
|
||||
$folders->get('cache'),
|
||||
null,
|
||||
$container->has('urls') ? $container->get('urls') : []
|
||||
);
|
||||
},
|
||||
eftec\bladeone\BladeOne::class => function(ContainerInterface $container) {
|
||||
return new eftec\bladeone\BladeOne(
|
||||
$container->get('folders')->get('templates'),
|
||||
$container->get('folders')->get('cache')
|
||||
);
|
||||
}
|
||||
];
|
8
app_old/ui/setups/03_services.php
Normal file
8
app_old/ui/setups/03_services.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
return [
|
||||
Psr\Http\Message\ResponseFactoryInterface::class => function(ContainerInterface $container) {
|
||||
return $container->get(Nyholm\Psr7\Factory\Psr17Factory::class);
|
||||
}
|
||||
];
|
30
app_old/ui/setups/98_logs.php
Normal file
30
app_old/ui/setups/98_logs.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
return [
|
||||
Psr\Log\LoggerInterface::class => function(ContainerInterface $container) {
|
||||
return new Monolog\Logger('ui', [
|
||||
new Monolog\Handler\FilterHandler(
|
||||
new Monolog\Handler\RotatingFileHandler('/logs/ui.debug.log'),
|
||||
Monolog\Level::Debug,
|
||||
Monolog\Level::Notice
|
||||
),
|
||||
new Monolog\Handler\FilterHandler(
|
||||
(new Monolog\Handler\RotatingFileHandler('/logs/ui.error.log'))
|
||||
->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true)),
|
||||
Monolog\Level::Warning,
|
||||
Monolog\Level::Error
|
||||
),
|
||||
new Monolog\Handler\FilterHandler(
|
||||
new Monolog\Handler\RotatingFileHandler('/logs/ui.critical.log'),
|
||||
Monolog\Level::Critical
|
||||
)
|
||||
], [
|
||||
$container->get(Monolog\Processor\PsrLogMessageProcessor::class),
|
||||
$container->get(Monolog\Processor\WebProcessor::class),
|
||||
$container->get(Monolog\Processor\IntrospectionProcessor::class),
|
||||
$container->get(Monolog\Processor\MemoryUsageProcessor::class),
|
||||
$container->get(Monolog\Processor\MemoryPeakUsageProcessor::class)
|
||||
]);
|
||||
}
|
||||
];
|
Reference in New Issue
Block a user