2024-08-27 14:50:45 -04:00
|
|
|
<?php
|
2025-07-22 13:18:00 +00:00
|
|
|
|
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
|
2024-08-27 14:50:45 -04:00
|
|
|
return [
|
2025-07-22 13:18:00 +00:00
|
|
|
'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();
|
2024-08-27 14:50:45 -04:00
|
|
|
}
|
|
|
|
];
|