protected function getQueueInformation(InputInterface $input, OutputInterface $output, DialogHelper $dialog)
    {
        if ($input->getOption('queue-disabled')) {
            return null;
        }

        $rtn = [];

        $helper = $this->getHelper('question');
        $question = new ConfirmationQuestion('Use beanstalkd to manage build queue? ', true);

        if (!$helper->ask($input, $output, $question)) {
            $output->writeln('<error>Skipping beanstalkd configuration.</error>');
            return null;
        }

        if (!$rtn['host'] = $input->getOption('queue-server')) {
            $rtn['host'] = $dialog->ask($output, 'Enter your beanstalkd hostname [localhost]: ', 'localhost');
        }

        if (!$rtn['queue'] = $input->getOption('queue-name')) {
            $rtn['queue'] = $dialog->ask($output, 'Enter the queue (tube) name to use [phpci]: ', 'phpci');
        }

        return $rtn;
    }
protected function getQueueInformation(InputInterface $input, OutputInterface $output, DialogHelper $dialog)
    {
        if ($input->getOption('queue-disabled')) {
            return null;
        }

        $rtn = [];

        $helper = $this->getHelper('question');
        $question = new ConfirmationQuestion('Use beanstalkd to manage build queue? ', true);

        if (!$helper->ask($input, $output, $question)) {
            $output->writeln('<error>Skipping beanstalkd configuration.</error>');
            return null;
        }

        if (!$rtn['host'] = $input->getOption('queue-server')) {
            $rtn['host'] = $dialog->ask($output, 'Enter your beanstalkd hostname [localhost]: ', 'localhost');
        }

        if (!$rtn['queue'] = $input->getOption('queue-name')) {
            $rtn['queue'] = $dialog->ask($output, 'Enter the queue (tube) name to use [phpci]: ', 'phpci');
        }

        return $rtn;
    }
protected function getQueueInformation ( InputInterface $ input , OutputInterface $ output , DialogHelper $ dialog ) { if ( $ input -> getOption ( 'queue-disabled' ) ) { return null ; } $ rtn = [ ] ; $ helper = $ this -> getHelper ( 'question' ) ; $ question = new ConfirmationQuestion ( 'Use beanstalkd to manage build queue? ' , true ) ; if ( ! $ helper -> ask ( $ input , $ output , $ question ) ) { $ output -> writeln ( '<error>Skipping beanstalkd configuration.</error>' ) ; return null ; } if ( ! $ rtn [ 'host' ] = $ input -> getOption ( 'queue-server' ) ) { $ rtn [ 'host' ] = $ dialog -> ask ( $ output , 'Enter your beanstalkd hostname [localhost]: ' , 'localhost' ) ; } if ( ! $ rtn [ 'queue' ] = $ input -> getOption ( 'queue-name' ) ) { $ rtn [ 'queue' ] = $ dialog -> ask ( $ output , 'Enter the queue (tube) name to use [phpci]: ' , 'phpci' ) ; } return $ rtn ; }
If the user wants to use a queue, get the necessary details.
@param InputInterface $input
@param OutputInterface $output
@param DialogHelper $dialog
@return array
If the user wants to use a queue get the necessary details .