protected static function mergeCommandOptionsIntoConfiguration(Configuration $config, InputExtendedInterface $input)
    {
        $configurationMapping = [
            // Database credentials
            'database-host' => 'Database.Host',
            'database-user' => 'Database.Username',
            'database-pass' => 'Database.Password',
            'database-port' => 'Database.Port',
            'database-name' => 'Database.Name',
            // SSH settings
            'ssh-key'       => 'SSH.KeyFile',
        ];

        foreach ($configurationMapping as $optionName => $configName) {
            if ($input->isOptionSet($optionName) === true) {
                $config->setConfigurationValue($configName, $input->getOption($optionName));

            // If the value is not set / available, set this to nothing
            } elseif (!$config->getConfigurationValue($configName)) {
                $config->setConfigurationValue($configName, null);
            }
        }

        return $config;
    }
protected static function mergeCommandOptionsIntoConfiguration(Configuration $config, InputExtendedInterface $input)
    {
        $configurationMapping = [
            // Database credentials
            'database-host' => 'Database.Host',
            'database-user' => 'Database.Username',
            'database-pass' => 'Database.Password',
            'database-port' => 'Database.Port',
            'database-name' => 'Database.Name',
            // SSH settings
            'ssh-key'       => 'SSH.KeyFile',
        ];

        foreach ($configurationMapping as $optionName => $configName) {
            if ($input->isOptionSet($optionName) === true) {
                $config->setConfigurationValue($configName, $input->getOption($optionName));

            // If the value is not set / available, set this to nothing
            } elseif (!$config->getConfigurationValue($configName)) {
                $config->setConfigurationValue($configName, null);
            }
        }

        return $config;
    }
protected static function mergeCommandOptionsIntoConfiguration ( Configuration $ config , InputExtendedInterface $ input ) { $ configurationMapping = [ // Database credentials 'database-host' => 'Database.Host' , 'database-user' => 'Database.Username' , 'database-pass' => 'Database.Password' , 'database-port' => 'Database.Port' , 'database-name' => 'Database.Name' , // SSH settings 'ssh-key' => 'SSH.KeyFile' , ] ; foreach ( $ configurationMapping as $ optionName => $ configName ) { if ( $ input -> isOptionSet ( $ optionName ) === true ) { $ config -> setConfigurationValue ( $ configName , $ input -> getOption ( $ optionName ) ) ; // If the value is not set / available, set this to nothing } elseif ( ! $ config -> getConfigurationValue ( $ configName ) ) { $ config -> setConfigurationValue ( $ configName , null ) ; } } return $ config ; }
Merges the command line options into a existing configuration.

E.g.
* Database credentials
* SSH settings

@param Configuration $config
@param InputExtendedInterface $input
@return Configuration
Merges the command line options into a existing configuration .