src/ServiceRuntime/RoleEnvironment.php
private static function _calculateConfigurationChanges(
        RoleEnvironmentData $currentRoleEnvironment,
        RoleEnvironmentData $newRoleEnvironment
    ) {
        $changes = [];
        $currentConfig = $currentRoleEnvironment->getConfigurationSettings();
        $newConfig = $newRoleEnvironment->getConfigurationSettings();

        foreach ($currentConfig as $settingKey => $setting) {
            if (array_key_exists($settingKey, $newConfig)) {
                if ($newConfig[$settingKey] != $currentConfig[$settingKey]) {
                    $changes[] = new RoleEnvironmentConfigurationSettingChange(
                        $settingKey
                    );
                }
            } else {
                $changes[] = new RoleEnvironmentConfigurationSettingChange(
                    $settingKey
                );
            }
        }

        foreach ($newConfig as $settingKey => $setting) {
            if (!array_key_exists($settingKey, $currentConfig)) {
                $changes[] = new RoleEnvironmentConfigurationSettingChange(
                    $settingKey
                );
            }
        }

        return $changes;
    }
private static function _calculateConfigurationChanges(
        RoleEnvironmentData $currentRoleEnvironment,
        RoleEnvironmentData $newRoleEnvironment
    ) {
        $changes = [];
        $currentConfig = $currentRoleEnvironment->getConfigurationSettings();
        $newConfig = $newRoleEnvironment->getConfigurationSettings();

        foreach ($currentConfig as $settingKey => $setting) {
            if (array_key_exists($settingKey, $newConfig)) {
                if ($newConfig[$settingKey] != $currentConfig[$settingKey]) {
                    $changes[] = new RoleEnvironmentConfigurationSettingChange(
                        $settingKey
                    );
                }
            } else {
                $changes[] = new RoleEnvironmentConfigurationSettingChange(
                    $settingKey
                );
            }
        }

        foreach ($newConfig as $settingKey => $setting) {
            if (!array_key_exists($settingKey, $currentConfig)) {
                $changes[] = new RoleEnvironmentConfigurationSettingChange(
                    $settingKey
                );
            }
        }

        return $changes;
    }
private static function _calculateConfigurationChanges ( RoleEnvironmentData $ currentRoleEnvironment , RoleEnvironmentData $ newRoleEnvironment ) { $ changes = [ ] ; $ currentConfig = $ currentRoleEnvironment -> getConfigurationSettings ( ) ; $ newConfig = $ newRoleEnvironment -> getConfigurationSettings ( ) ; foreach ( $ currentConfig as $ settingKey => $ setting ) { if ( array_key_exists ( $ settingKey , $ newConfig ) ) { if ( $ newConfig [ $ settingKey ] != $ currentConfig [ $ settingKey ] ) { $ changes [ ] = new RoleEnvironmentConfigurationSettingChange ( $ settingKey ) ; } } else { $ changes [ ] = new RoleEnvironmentConfigurationSettingChange ( $ settingKey ) ; } } foreach ( $ newConfig as $ settingKey => $ setting ) { if ( ! array_key_exists ( $ settingKey , $ currentConfig ) ) { $ changes [ ] = new RoleEnvironmentConfigurationSettingChange ( $ settingKey ) ; } } return $ changes ; }
Calculates the configuration changes.

@param RoleEnvironmentData $currentRoleEnvironment The current role
environment data
@param RoleEnvironmentData $newRoleEnvironment     The new role
environment data

@static

@return RoleEnvironmentConfigurationSettingChange[]
Calculates the configuration changes .