26 private $commandRenderer;
34 \Psr\Log\LoggerInterface
$logger =
null 37 $this->commandRenderer = $commandRenderer;
50 $command = $this->commandRenderer->render($command,
$arguments);
53 $disabled = explode(
',', str_replace(
' ',
',',
ini_get(
'disable_functions')));
54 if (in_array(
'exec', $disabled)) {
55 throw new Exception\LocalizedException(
new \
Magento\Framework\
Phrase(
'The exec function is disabled.'));
63 $commandError = new \Exception(
$output, $exitCode);
64 throw new Exception\LocalizedException(
65 new \
Magento\Framework\
Phrase(
"Command returned non-zero exit code:\n`%1`", [$command]),
exec($command, array &$output=null, &$return_var=null)
__construct(CommandRendererInterface $commandRenderer, \Psr\Log\LoggerInterface $logger=null)
execute($command, array $arguments=[])