Skip to content

Instantly share code, notes, and snippets.

@jacobsenj
Created March 2, 2016 10:32
Show Gist options
  • Save jacobsenj/dc8c1252408d9584cb3d to your computer and use it in GitHub Desktop.
Save jacobsenj/dc8c1252408d9584cb3d to your computer and use it in GitHub Desktop.
<?php
$question = new \Symfony\Component\Console\Question\ConfirmationQuestion('Continue with deployment of branch [' . $branch . '] for domain ' . $domain . ' [' . $server . "]?\n(y|N) ", FALSE, '/^(y|j)/i');
$helper = new \Symfony\Component\Console\Helper\QuestionHelper;
$input = new \Symfony\Component\Console\Input\ArgvInput;
$output = new \Symfony\Component\Console\Output\StreamOutput(fopen('php://stdout', 'w'));
if (!$helper->ask($input, $output, $question)) {
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment