Symfony\Installer\DemoCommand::initialize PHP Метод

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

protected initialize ( 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 initialize(InputInterface $input, OutputInterface $output)
    {
        parent::initialize($input, $output);
        $this->version = 'lts';
        if (!$input->getArgument('directory')) {
            $this->projectDir = getcwd();
            $i = 1;
            $projectName = 'symfony_demo';
            while (file_exists($this->projectDir . DIRECTORY_SEPARATOR . $projectName)) {
                $projectName = 'symfony_demo_' . ++$i;
            }
            $this->projectName = $projectName;
            $this->projectDir = $this->projectDir . DIRECTORY_SEPARATOR . $projectName;
        } else {
            $directory = rtrim(trim($input->getArgument('directory')), DIRECTORY_SEPARATOR);
            $this->projectDir = $this->fs->isAbsolutePath($directory) ? $directory : getcwd() . DIRECTORY_SEPARATOR . $directory;
            $this->projectName = basename($directory);
        }
        $this->composerManager = new ComposerManager($this->projectDir);
    }