N98\Magento\Command\Config\SearchCommand::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат integer | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->detectMagento($output, true);
        if (!$this->initMagento()) {
            return;
        }
        $this->writeSection($output, 'Config Search');
        $searchString = $input->getArgument('text');
        $system = \Mage::getConfig()->loadModulesConfiguration('system.xml');
        $matches = $this->_searchConfiguration($searchString, $system);
        if (count($matches) > 0) {
            foreach ($matches as $match) {
                $output->writeln('Found a <comment>' . $match->type . '</comment> with a match');
                $output->writeln('  ' . $this->_getPhpMageStoreConfigPathFromMatch($match));
                $output->writeln('  ' . $this->_getPathFromMatch($match));
                if ($match->match_type == 'comment') {
                    $output->writeln('  ' . str_ireplace($searchString, '<info>' . $searchString . '</info>', (string) $match->node->comment));
                }
                $output->writeln('');
            }
        } else {
            $output->writeln('<info>No matches for <comment>' . $searchString . '</comment></info>');
        }
    }