protected function processOptions(InputInterface $input)
    {

        if ($this->getContainer()->offsetExists('dbs')) {
            $params = $this->getContainer()['dbs'][$input->getOption('connection')]
                ->getParams();
            $this->getHelperSet()->set(
                new ConnectionHelper(
                    $this->getContainer()['dbs'][$input->getOption('connection')],
                    'db'
                )
            );
        } else {
            $params = $this->getHelper('db')->getConnection()->getParams();
        }

        if ($input->getOption('user') != null) {
            $params['user'] = $input->getOption('user');
            $params['password'] = $input->getOption('password');
        }

        unset($params['dbname']);
        unset($params['path']);

        $this->setConnection(DriverManager::getConnection($params));
    }
protected function processOptions(InputInterface $input)
    {

        if ($this->getContainer()->offsetExists('dbs')) {
            $params = $this->getContainer()['dbs'][$input->getOption('connection')]
                ->getParams();
            $this->getHelperSet()->set(
                new ConnectionHelper(
                    $this->getContainer()['dbs'][$input->getOption('connection')],
                    'db'
                )
            );
        } else {
            $params = $this->getHelper('db')->getConnection()->getParams();
        }

        if ($input->getOption('user') != null) {
            $params['user'] = $input->getOption('user');
            $params['password'] = $input->getOption('password');
        }

        unset($params['dbname']);
        unset($params['path']);

        $this->setConnection(DriverManager::getConnection($params));
    }
protected function processOptions ( InputInterface $ input ) { if ( $ this -> getContainer ( ) -> offsetExists ( 'dbs' ) ) { $ params = $ this -> getContainer ( ) [ 'dbs' ] [ $ input -> getOption ( 'connection' ) ] -> getParams ( ) ; $ this -> getHelperSet ( ) -> set ( new ConnectionHelper ( $ this -> getContainer ( ) [ 'dbs' ] [ $ input -> getOption ( 'connection' ) ] , 'db' ) ) ; } else { $ params = $ this -> getHelper ( 'db' ) -> getConnection ( ) -> getParams ( ) ; } if ( $ input -> getOption ( 'user' ) != null ) { $ params [ 'user' ] = $ input -> getOption ( 'user' ) ; $ params [ 'password' ] = $ input -> getOption ( 'password' ) ; } unset ( $ params [ 'dbname' ] ) ; unset ( $ params [ 'path' ] ) ; $ this -> setConnection ( DriverManager :: getConnection ( $ params ) ) ; }
Processes input options, sets connection without database selected.
If default connection change overrides existing connection helper.
@param InputInterface $input Console input instance
@throws \Doctrine\DBAL\DBALException
@return void
Processes input options sets connection without database selected . If default connection change overrides existing connection helper .