27 lines
916 B
PHP
27 lines
916 B
PHP
<?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();
|
|
}
|
|
];
|