Magestead\Command\Index\ReindexCommand::getCommand PHP Method

getCommand() protected method

protected getCommand ( Config $config, $index ) : boolean | string
$config Magestead\Helper\Config
$index
return boolean | string
    protected function getCommand(Config $config, $index)
    {
        $type = $config->type;
        switch ($type) {
            case 'magento':
                $index = !is_null($index) ? ' ' . $index : ':all';
                return "cd /var/www/public;../bin/n98-magerun.phar index:reindex{$index}";
            case 'magento2':
                return "cd /var/www/public;bin/magento indexer:reindex {$index}";
        }
        return false;
    }