2 declare(strict_types = 1);
18 use Symfony\Component\Console\Exception\InvalidOptionException;
19 use Symfony\Component\Console\Input\ArrayInput;
20 use Symfony\Component\Console\Output\NullOutput;
86 $commandRegistry = GeneralUtility::makeInstance(CommandRegistry::class);
87 $schedulableCommand = $commandRegistry->getCommandByIdentifier($this->commandIdentifier);
88 }
catch (UnknownCommandException $e) {
89 throw new \RuntimeException(
91 $this->
getLanguageService()->sL(
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:msg.unregisteredCommand'),
92 $this->commandIdentifier
102 return $schedulableCommand->run($input,
$output) === 0;
115 $commandRegistry = GeneralUtility::makeInstance(CommandRegistry::class);
116 $schedulableCommand = $commandRegistry->getCommandByIdentifier($this->commandIdentifier);
117 }
catch (UnknownCommandException $e) {
119 $this->
getLanguageService()->sL(
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:msg.unregisteredCommand'),
120 $this->commandIdentifier
125 $input =
new ArrayInput($this->
getParameters(
true), $schedulableCommand->getDefinition());
127 }
catch (\Symfony\Component\Console\Exception\RuntimeException|\Symfony\Component\Console\Exception\InvalidArgumentException $e) {
130 $this->
getLanguageService()->sL(
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:msg.errorParsingArguments'),
133 }
catch (InvalidOptionException $e) {
136 $this->
getLanguageService()->sL(
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:msg.errorParsingOptions'),
183 if (is_bool($argumentValue)) {
184 $argumentValue = (int)$argumentValue;
186 $this->defaults[$argumentName] = $argumentValue;
200 foreach ($this->options as $name => $enabled) {
202 $value = $this->optionValues[$name] ??
null;
203 $options[
'--' . $name] = ($forDisplay && $value ===
true) ?
'' : $value;
206 return array_merge($this->arguments,
$options);