PPI\Framework\Console\Command\ModuleCreateCommand::checkEnabledTemplatingEngines PHP Метод

checkEnabledTemplatingEngines() приватный Метод

private checkEnabledTemplatingEngines ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    private function checkEnabledTemplatingEngines(InputInterface $input, OutputInterface $output)
    {
        // PHP Templating Engine checks
        if ($this->tplEngine == self::TPL_ENGINE_PHP) {
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
                $output->writeln(sprintf("<comment>PHP is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
            }
        }
        // Twig Checks
        if ($this->tplEngine == self::TPL_ENGINE_TWIG) {
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
                $output->writeln(sprintf("<comment>Twig is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
            }
            if (!class_exists('\\Twig_Environment')) {
                $output->writeln("<comment>Twig doesn't appear to be loaded. Run: <info>composer require ppi/twig-module</info></comment>");
            }
        }
        // Smarty Checks
        if ($this->tplEngine == self::TPL_ENGINE_SMARTY) {
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
                $output->writeln(sprintf("<comment>Smarty is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
            }
            if (!class_exists('\\Smarty')) {
                $output->writeln("<comment>Smarty doesn't appear to be loaded. Run: <info>composer require ppi/smarty-module</info></comment>");
            }
        }
        // Plates Checks
        if ($this->tplEngine == self::TPL_ENGINE_PLATES) {
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
                $output->writeln(sprintf("<comment>Plates is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
            }
            if (!class_exists('\\PPI\\PlatesModule\\Wrapper\\PlatesWrapper')) {
                $output->writeln("<comment>Plates doesn't appear to be loaded. Run: <info>composer require ppi/plates-module</info></comment>");
            }
        }
        // Plates Checks
        if ($this->tplEngine == self::TPL_ENGINE_LATTE) {
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
                $output->writeln(sprintf("<comment>Latte is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
            }
            if (!class_exists('\\PPI\\LatteModule\\Wrapper\\LatteWrapper')) {
                $output->writeln("<comment>Latte doesn't appear to be loaded. Run: <info>composer require ppi/latte-module</info></comment>");
            }
        }
    }