/** * Interacts with the user to retrieve host configurations. * * @param OutputStyle $io */ private function interactForHostConfigurations(OutputStyle $io) { $io->writeln(' Add host configurations:'); $addHost = true; while ($addHost) { $stage = $io->choice('Stage', array(Host::STAGE_PRODUCTION, Host::STAGE_ACCEPTANCE, Host::STAGE_TEST)); $hostname = $io->ask('Hostname'); $path = $io->ask('Workspace path'); $connectionType = $io->ask('Connection type (eg. local or ssh)'); $this->configuration['hosts'][] = array('stage' => $stage, 'connectionType' => $connectionType, 'hostname' => $hostname, 'path' => $path); $addHost = $io->confirm('Add another host?'); } }