/** * Constructor. * * @param FileLocatorInterface $locator A FileLocatorInterface instance * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance */ public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser) { parent::__construct(array()); $this->locator = $locator; $this->parser = $parser; $this->cache = array(); $container = AbstractApp::getCont(); // no niestety pojawiły się problemy z nadpisywaniem tego serwisu, później może zrobię to tak jak Bóg nakazał... // ale to nie jest pilne bo logicznie wszystko tutaj jest poprawne ale nie wedłóg konwencji symfonowej $this->container = $container; $this->dev = $container->getParameter('kernel.environment') == 'dev'; $this->symlinkloader = AbstractApp::getStpaConfig('yui.symlinkloader', false); $this->loader = is_string($this->symlinkloader) ? trim($this->symlinkloader) : ''; }
/** * @param InputInterface $input * @param OutputInterface $output */ public function execute(InputInterface $input, OutputInterface $output) { // tworzenie katalogu głównego /app $app = AbstractApp::getStpaConfig('core.app'); if (!file_exists($app)) { UtilFilesystem::checkDir(dirname($app), true); $output->writeln("<info>Tworzenie katalogu: </info><comment>{$app}</comment>"); mkdir($app); } $list = $this->_findPartsClasses(); if ($input->getOption('list') === false) { foreach ($list as $cls) { /* @var $cls AbstractInstallerPart */ $cls->install($input, $output); } } else { $tmp = array(); foreach ($list as $cls) { /* @var $cls AbstractInstallerPart */ $tmp[] = str_pad($cls->getPrior(), 8, ' ', STR_PAD_LEFT) . ' : ' . get_class($cls); } $output->writeln(implode("\n", $tmp)); } }