Command\GenerateProjectCommand::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $config = $this->loadProfileFile($input->getOption('profile'));
        $this->checkOptionParameters($input);
        $filesystem = new Filesystem();
        $output->writeln('<info>Initializing Project</info>');
        $path = $this->getAbsolutePath($input->getArgument('path'));
        if ($input->getOption('force-delete')) {
            if (is_dir($path)) {
                $output->writeln(sprintf('> Remove project on <comment>%s</comment>', $path));
                $this->removeProject($path, $filesystem);
            }
        }
        $this->checkPathAvailable($path, $filesystem);
        $output->writeln(sprintf('> Generate project on <comment>%s</comment>', $path));
        $this->generateProjectFolder($input, $filesystem);
        $bundlesCollection = $this->generateBundlesCollection($input, $config);
        $customConfig = $this->generateCustomConfigBundles($bundlesCollection);
        $bundles = $bundlesCollection->getFormatted(12);
        $namespacesCollection = $this->generateNamespacesCollection($input, $config);
        $namespaces = $namespacesCollection->getFormatted(4);
        $prefixCollection = $this->generatePrefixesCollection($input, $config);
        $prefixes = $prefixCollection->getFormatted(4);
        $this->findAndReplace($input, $bundles, $namespaces, $prefixes, $customConfig);
        $repositories = $this->getRepositoriesCollection($input, $config);
        $this->installRepositories($repositories, $input, $output);
        chdir($path);
        $output->writeln(' > <info>Generate bootstrap files</info>');
        exec('php bin/build_bootstrap.php');
        $output->writeln(' > <info>Assets install</info>');
        $option = $input->getOption('assets-symlink') ? ' --symlink' : '';
        exec(sprintf('php app/console assets:install%s web', $option));
        $output->writeln(sprintf(' > <info>Clear cache and log</info>'));
        $filesystem->remove('app/cache/dev');
        $filesystem->remove('app/logs/dev.log');
        if ($config->bundles->user || $config->namespaces->user || $config->prefixes->user || $config->repositories->user) {
            $output->writeln(sprintf(' > <comment>Add your personalized config for this project</comment>'));
        }
    }