public function loadConfig(array $options)
    {
        foreach (self::$AVAILABLE_OPTIONS as $option) {
            if (isset($options[$option])) {
                $method = 'set' . \ucfirst($option);
                $this->$method($options[$option]);
            }
        }

        // legacy `tabCompletion` option
        if (isset($options['tabCompletion'])) {
            $msg = '`tabCompletion` is deprecated; use `useTabCompletion` instead.';
            @\trigger_error($msg, E_USER_DEPRECATED);

            $this->setUseTabCompletion($options['tabCompletion']);
        }

        foreach (['commands', 'matchers', 'casters'] as $option) {
            if (isset($options[$option])) {
                $method = 'add' . \ucfirst($option);
                $this->$method($options[$option]);
            }
        }

        // legacy `tabCompletionMatchers` option
        if (isset($options['tabCompletionMatchers'])) {
            $msg = '`tabCompletionMatchers` is deprecated; use `matchers` instead.';
            @\trigger_error($msg, E_USER_DEPRECATED);

            $this->addMatchers($options['tabCompletionMatchers']);
        }
    }
public function loadConfig(array $options)
    {
        foreach (self::$AVAILABLE_OPTIONS as $option) {
            if (isset($options[$option])) {
                $method = 'set' . \ucfirst($option);
                $this->$method($options[$option]);
            }
        }

        // legacy `tabCompletion` option
        if (isset($options['tabCompletion'])) {
            $msg = '`tabCompletion` is deprecated; use `useTabCompletion` instead.';
            @\trigger_error($msg, E_USER_DEPRECATED);

            $this->setUseTabCompletion($options['tabCompletion']);
        }

        foreach (['commands', 'matchers', 'casters'] as $option) {
            if (isset($options[$option])) {
                $method = 'add' . \ucfirst($option);
                $this->$method($options[$option]);
            }
        }

        // legacy `tabCompletionMatchers` option
        if (isset($options['tabCompletionMatchers'])) {
            $msg = '`tabCompletionMatchers` is deprecated; use `matchers` instead.';
            @\trigger_error($msg, E_USER_DEPRECATED);

            $this->addMatchers($options['tabCompletionMatchers']);
        }
    }
public function loadConfig ( array $ options ) { foreach ( self :: $ AVAILABLE_OPTIONS as $ option ) { if ( isset ( $ options [ $ option ] ) ) { $ method = 'set' . \ ucfirst ( $ option ) ; $ this -> $ method ( $ options [ $ option ] ) ; } } // legacy `tabCompletion` option if ( isset ( $ options [ 'tabCompletion' ] ) ) { $ msg = '`tabCompletion` is deprecated; use `useTabCompletion` instead.' ; @ \ trigger_error ( $ msg , E_USER_DEPRECATED ) ; $ this -> setUseTabCompletion ( $ options [ 'tabCompletion' ] ) ; } foreach ( [ 'commands' , 'matchers' , 'casters' ] as $ option ) { if ( isset ( $ options [ $ option ] ) ) { $ method = 'add' . \ ucfirst ( $ option ) ; $ this -> $ method ( $ options [ $ option ] ) ; } } // legacy `tabCompletionMatchers` option if ( isset ( $ options [ 'tabCompletionMatchers' ] ) ) { $ msg = '`tabCompletionMatchers` is deprecated; use `matchers` instead.' ; @ \ trigger_error ( $ msg , E_USER_DEPRECATED ) ; $ this -> addMatchers ( $ options [ 'tabCompletionMatchers' ] ) ; } }
Load configuration values from an array of options.

@param array $options
Load configuration values from an array of options .