N98\Magento\Command\Cache\ViewCommand::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;
        }
        if ($input->hasOption('fpc') && $input->getOption('fpc')) {
            if (!class_exists('\\Enterprise_PageCache_Model_Cache')) {
                throw new RuntimeException('Enterprise page cache not found');
            }
            $cacheInstance = \Enterprise_PageCache_Model_Cache::getCacheInstance()->getFrontend();
        } else {
            $cacheInstance = \Mage::app()->getCache();
        }
        /* @var $cacheInstance \Varien_Cache_Core */
        $cacheData = $cacheInstance->load($input->getArgument('id'));
        if ($input->getOption('unserialize')) {
            $cacheData = unserialize($cacheData);
            $cacheData = print_r($cacheData, true);
        }
        $output->writeln($cacheData);
    }