Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Shell
Driver.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Shell
;
8
9
use
Magento\Framework\Exception\LocalizedException
;
10
14
class
Driver
15
{
19
private
$commandRenderer;
20
24
public
function
__construct
(
CommandRendererInterface
$commandRenderer)
25
{
26
$this->commandRenderer = $commandRenderer;
27
}
28
37
public
function
execute
($command,
$arguments
)
38
{
39
$disabled = explode(
','
, str_replace(
' '
,
','
,
ini_get
(
'disable_functions'
)));
40
if
(in_array(
'exec'
, $disabled)) {
41
throw
new
LocalizedException
(
new
\
Magento
\Framework\
Phrase
(
'The exec function is disabled.'
));
42
}
43
44
$command = $this->commandRenderer->render($command,
$arguments
);
45
exec
($command,
$output
, $exitCode);
46
$output
= implode(PHP_EOL,
$output
);
47
return
new
Response
([
'output'
=>
$output
,
'exit_code'
=> $exitCode,
'escaped_command'
=> $command]);
48
}
49
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\Framework\App\Response\Http
Definition:
FileFactory.php:7
Magento\MessageQueue\Model\Cron\ConsumersRunner\exec
exec($command, array &$output=null, &$return_var=null)
Definition:
pid_consumer_functions_mocks.php:26
Magento\Framework\Shell\CommandRendererInterface
Definition:
CommandRendererInterface.php:14
Magento\Framework\Shell
Definition:
CommandRenderer.php:6
Magento\Framework\Shell\Driver\__construct
__construct(CommandRendererInterface $commandRenderer)
Definition:
Driver.php:24
Magento\Framework\Image\Adapter\ini_get
ini_get($paramName)
Definition:
global_php_mock.php:19
Magento\Framework\Shell\Driver
Definition:
Driver.php:14
$output
$output
Definition:
classmap_generator.php:100
Magento
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\Shell\Driver\execute
execute($command, $arguments)
Definition:
Driver.php:37