N98\Magento\Command\AbstractMagentoCommand::detectMagento PHP Метод

detectMagento() публичный Метод

Search for magento root folder
public detectMagento ( Symfony\Component\Console\Output\OutputInterface $output, boolean $silent = true )
$output Symfony\Component\Console\Output\OutputInterface
$silent boolean print debug messages
    public function detectMagento(OutputInterface $output, $silent = true)
    {
        $this->getApplication()->detectMagento();
        $this->_magentoEnterprise = $this->getApplication()->isMagentoEnterprise();
        $this->_magentoRootFolder = $this->getApplication()->getMagentoRootFolder();
        $this->_magentoMajorVersion = $this->getApplication()->getMagentoMajorVersion();
        if (!$silent) {
            $editionString = $this->_magentoEnterprise ? ' (Enterprise Edition) ' : '';
            $output->writeln('<info>Found Magento ' . $editionString . 'in folder "' . $this->_magentoRootFolder . '"</info>');
        }
        if (!empty($this->_magentoRootFolder)) {
            return;
        }
        throw new RuntimeException('Magento folder could not be detected');
    }