N98\Magento\Command\Cache\FlushCommand::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);
        $noReinitOption = $input->getOption('no-reinit');
        if (!$noReinitOption) {
            $this->banUseCache();
        }
        if (!$this->initMagento()) {
            return;
        }
        \Mage::app()->loadAreaPart('adminhtml', 'events');
        \Mage::dispatchEvent('adminhtml_cache_flush_all', array('output' => $output));
        $result = \Mage::app()->getCacheInstance()->flush();
        if ($result) {
            $output->writeln('<info>Cache cleared</info>');
        } else {
            $output->writeln('<error>Failed to clear Cache</error>');
        }
        if (!$noReinitOption) {
            $this->reinitCache();
        }
        /* Since Magento 1.10 we have an own cache handler for FPC */
        if ($this->isEnterpriseFullPageCachePresent()) {
            $result = \Enterprise_PageCache_Model_Cache::getCacheInstance()->flush();
            if ($result) {
                $output->writeln('<info>FPC cleared</info>');
            } else {
                $output->writeln('<error>Failed to clear FPC</error>');
            }
        }
    }