magento Controller 调用command

$_SERVER['argv'] = array (
    0 => 'bin/magento',
    1 => 'indexer:reindex',
    2 => 'cataloginventory_stock',
);
$application = new Cli('Magento CLI');
$application->run();

你可能感兴趣的:(magento)