src/Common/CloudConfigurationManager.php
public static function registerSource($name, $provider = null, $prepend = false)
    {
        Validate::isString($name, 'name');
        Validate::notNullOrEmpty($name, 'name');

        self::_init();
        $default = ConnectionStringSource::getDefaultSources();

        // Try to get callback if the user is trying to register a default source.
        $provider = Utilities::tryGetValue($default, $name, $provider);

        Validate::notNullOrEmpty($provider, 'callback');

        if ($prepend) {
            self::$_sources = array_merge(
                [$name => $provider],
                self::$_sources
            );
        } else {
            self::$_sources[$name] = $provider;
        }
    }
public static function registerSource($name, $provider = null, $prepend = false)
    {
        Validate::isString($name, 'name');
        Validate::notNullOrEmpty($name, 'name');

        self::_init();
        $default = ConnectionStringSource::getDefaultSources();

        // Try to get callback if the user is trying to register a default source.
        $provider = Utilities::tryGetValue($default, $name, $provider);

        Validate::notNullOrEmpty($provider, 'callback');

        if ($prepend) {
            self::$_sources = array_merge(
                [$name => $provider],
                self::$_sources
            );
        } else {
            self::$_sources[$name] = $provider;
        }
    }
public static function registerSource ( $ name , $ provider = null , $ prepend = false ) { Validate :: isString ( $ name , 'name' ) ; Validate :: notNullOrEmpty ( $ name , 'name' ) ; self :: _init ( ) ; $ default = ConnectionStringSource :: getDefaultSources ( ) ; // Try to get callback if the user is trying to register a default source. $ provider = Utilities :: tryGetValue ( $ default , $ name , $ provider ) ; Validate :: notNullOrEmpty ( $ provider , 'callback' ) ; if ( $ prepend ) { self :: $ _sources = array_merge ( [ $ name => $ provider ] , self :: $ _sources ) ; } else { self :: $ _sources [ $ name ] = $ provider ; } }
Registers a new connection string source provider. If the source to get
registered is a default source, only the name of the source is required.

@param string   $name     The source name
@param callable $provider The source callback
@param bool     $prepend  When true, the $provider is processed first when
calling getConnectionString. When false (the default) the $provider is
processed after the existing callbacks
Registers a new connection string source provider . If the source to get registered is a default source only the name of the source is required .