lib/providers/BaseProvider.php
public function init()
    {
        foreach (static::defaultConfig() as $key => $value) {
            if (!isset($this->{$key})) {
                $this->{$key} = $value;
            }
        }
        foreach (static::requiredConfig() as $key) {
            if (!isset($this->{$key})) {
                throw new InvalidConfigException(get_class($this) . " key provider requires '{$key}' config key");
            }
        }
        KeyProviderCollector::internalRegisterProvider($this);
    }
public function init()
    {
        foreach (static::defaultConfig() as $key => $value) {
            if (!isset($this->{$key})) {
                $this->{$key} = $value;
            }
        }
        foreach (static::requiredConfig() as $key) {
            if (!isset($this->{$key})) {
                throw new InvalidConfigException(get_class($this) . " key provider requires '{$key}' config key");
            }
        }
        KeyProviderCollector::internalRegisterProvider($this);
    }
public function init ( ) { foreach ( static :: defaultConfig ( ) as $ key => $ value ) { if ( ! isset ( $ this -> { $ key } ) ) { $ this -> { $ key } = $ value ; } } foreach ( static :: requiredConfig ( ) as $ key ) { if ( ! isset ( $ this -> { $ key } ) ) { throw new InvalidConfigException ( get_class ( $ this ) . " key provider requires '{$key}' config key" ) ; } } KeyProviderCollector :: internalRegisterProvider ( $ this ) ; }
Initializes the object and registers the provider

@throws  InvalidConfigException When a required configuration prarameter is not set
@see     \yii\base\Object
Initializes the object and registers the provider