N98\Magento\Command\Config\GetCommand::renderAsUpdateScript PHP Method

renderAsUpdateScript() protected method

protected renderAsUpdateScript ( Symfony\Component\Console\Output\OutputInterface $output, array $table )
$output Symfony\Component\Console\Output\OutputInterface
$table array
    protected function renderAsUpdateScript(OutputInterface $output, $table)
    {
        $output->writeln('<?php');
        $output->writeln('$installer = $this;');
        $output->writeln('# generated by n98-magerun');
        foreach ($table as $row) {
            if ($row['scope'] == 'default') {
                $output->writeln(sprintf('$installer->setConfigData(%s, %s);', var_export($row['path'], true), var_export($row['value'], true)));
            } else {
                $output->writeln(sprintf('$installer->setConfigData(%s, %s, %s, %s);', var_export($row['path'], true), var_export($row['value'], true), var_export($row['scope'], true), var_export($row['scope_id'], true)));
            }
        }
    }