Symfony\Installer\DownloadCommand::initialize PHP Method

initialize() protected method

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)
    {
        $this->output = $output;
        $this->fs = new Filesystem();
        $this->latestInstallerVersion = $this->getUrlContents(Application::VERSIONS_URL);
        $this->localInstallerVersion = $this->getApplication()->getVersion();
        $this->enableSignalHandler();
    }

Usage Example

 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     parent::initialize($input, $output);
     $directory = rtrim(trim($input->getArgument('directory')), DIRECTORY_SEPARATOR);
     $this->version = trim($input->getArgument('version'));
     $this->projectDir = $this->fs->isAbsolutePath($directory) ? $directory : getcwd() . DIRECTORY_SEPARATOR . $directory;
     $this->projectName = basename($directory);
 }
All Usage Examples Of Symfony\Installer\DownloadCommand::initialize