protected function getDatabaseInformation(InputInterface $input, OutputInterface $output)
    {
        $db = array();

        /**
         * @var \Symfony\Component\Console\Helper\DialogHelper
         */
        $dialog = $this->getHelperSet()->get('dialog');

        if (!$dbHost = $input->getOption('db-host')) {
            $dbHost = $dialog->ask($output, Lang::get('enter_db_host'), 'localhost');
        }

        if (!$dbName = $input->getOption('db-name')) {
            $dbName = $dialog->ask($output, Lang::get('enter_db_name'), 'phpci');
        }

        if (!$dbUser = $input->getOption('db-user')) {
            $dbUser = $dialog->ask($output, Lang::get('enter_db_user'), 'phpci');
        }

        if (!$dbPass = $input->getOption('db-pass')) {
            $dbPass = $dialog->askHiddenResponse($output, Lang::get('enter_db_pass'));
        }

        $db['servers']['read'] = $dbHost;
        $db['servers']['write'] = $dbHost;
        $db['name'] = $dbName;
        $db['username'] = $dbUser;
        $db['password'] = $dbPass;

        return $db;
    }
protected function getDatabaseInformation(InputInterface $input, OutputInterface $output)
    {
        $db = array();

        /**
         * @var \Symfony\Component\Console\Helper\DialogHelper
         */
        $dialog = $this->getHelperSet()->get('dialog');

        if (!$dbHost = $input->getOption('db-host')) {
            $dbHost = $dialog->ask($output, Lang::get('enter_db_host'), 'localhost');
        }

        if (!$dbName = $input->getOption('db-name')) {
            $dbName = $dialog->ask($output, Lang::get('enter_db_name'), 'phpci');
        }

        if (!$dbUser = $input->getOption('db-user')) {
            $dbUser = $dialog->ask($output, Lang::get('enter_db_user'), 'phpci');
        }

        if (!$dbPass = $input->getOption('db-pass')) {
            $dbPass = $dialog->askHiddenResponse($output, Lang::get('enter_db_pass'));
        }

        $db['servers']['read'] = $dbHost;
        $db['servers']['write'] = $dbHost;
        $db['name'] = $dbName;
        $db['username'] = $dbUser;
        $db['password'] = $dbPass;

        return $db;
    }
protected function getDatabaseInformation ( InputInterface $ input , OutputInterface $ output ) { $ db = array ( ) ; /**
         * @var \Symfony\Component\Console\Helper\DialogHelper
         */ $ dialog = $ this -> getHelperSet ( ) -> get ( 'dialog' ) ; if ( ! $ dbHost = $ input -> getOption ( 'db-host' ) ) { $ dbHost = $ dialog -> ask ( $ output , Lang :: get ( 'enter_db_host' ) , 'localhost' ) ; } if ( ! $ dbName = $ input -> getOption ( 'db-name' ) ) { $ dbName = $ dialog -> ask ( $ output , Lang :: get ( 'enter_db_name' ) , 'phpci' ) ; } if ( ! $ dbUser = $ input -> getOption ( 'db-user' ) ) { $ dbUser = $ dialog -> ask ( $ output , Lang :: get ( 'enter_db_user' ) , 'phpci' ) ; } if ( ! $ dbPass = $ input -> getOption ( 'db-pass' ) ) { $ dbPass = $ dialog -> askHiddenResponse ( $ output , Lang :: get ( 'enter_db_pass' ) ) ; } $ db [ 'servers' ] [ 'read' ] = $ dbHost ; $ db [ 'servers' ] [ 'write' ] = $ dbHost ; $ db [ 'name' ] = $ dbName ; $ db [ 'username' ] = $ dbUser ; $ db [ 'password' ] = $ dbPass ; return $ db ; }
Load configuration for DB form CLI options or ask info to user.

@param InputInterface $input
@param OutputInterface $output
@return array
Load configuration for DB form CLI options or ask info to user .