Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
command.php
Go to the documentation of this file.
1 <?php
7 require_once __DIR__ . '/../../../../app/bootstrap.php';
8 
9 use Symfony\Component\Console\Input\StringInput;
10 use Symfony\Component\Console\Output\NullOutput;
11 
12 if (isset($_GET['command'])) {
13  $command = urldecode($_GET['command']);
16  $cli = $magentoObjectManager->create(\Magento\Framework\Console\Cli::class);
17  $input = new StringInput($command);
18  $input->setInteractive(false);
19  $output = new NullOutput();
20  $cli->doRun($input, $output);
21 } else {
22  throw new \InvalidArgumentException("Command GET parameter is not set.");
23 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
static createObjectManagerFactory($rootDir, array $initParams)
Definition: Bootstrap.php:149
const BP
Definition: autoload.php:14
$magentoObjectManager
$magentoObjectManagerFactory