develop (#45)
Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl> Reviewed-on: #45
This commit is contained in:
26
cli/setup/settings/commands.php
Normal file
26
cli/setup/settings/commands.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
return [
|
||||
'commands' => function(ContainerInterface $container) {
|
||||
$service = $container->get(Incoviba\Service\Commands::class);
|
||||
if ($container->has('folders')) {
|
||||
$folders = $container->get('folders');
|
||||
if (is_array($folders)) {
|
||||
if (array_key_exists('commands', $folders)) {
|
||||
$service->baseCommandsPath = $folders['commands'];
|
||||
}
|
||||
} elseif (isset($folders->commands)) {
|
||||
$service->baseCommandsPath = $folders->commands;
|
||||
}
|
||||
}
|
||||
if ($container->has('skip_commands')) {
|
||||
$service->skipCommands = $container->get('skip_commands');
|
||||
}
|
||||
if ($container->has('skipCommands')) {
|
||||
$service->skipCommands = $container->get('skipCommands');
|
||||
}
|
||||
return $service->getCommandsList();
|
||||
}
|
||||
];
|
@ -6,9 +6,9 @@ return [
|
||||
$arr['base'],
|
||||
'resources'
|
||||
]);
|
||||
$arr['commands'] = implode(DIRECTORY_SEPARATOR, [
|
||||
$arr['resources'],
|
||||
'commands'
|
||||
$arr['cache'] = implode(DIRECTORY_SEPARATOR, [
|
||||
$arr['base'],
|
||||
'cache'
|
||||
]);
|
||||
return (object) $arr;
|
||||
}
|
||||
|
9
cli/setup/settings/other.php
Normal file
9
cli/setup/settings/other.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
return [
|
||||
DateTimeZone::class => function(ContainerInterface $container) {
|
||||
return new DateTimeZone($container->get('TZ') ?? 'America/Santiago');
|
||||
},
|
||||
'loopFrequency' => 60
|
||||
];
|
Reference in New Issue
Block a user