protected function loadAdditionalConfigFiles() {
        $additionalConfigFiles = [];

        foreach ($this->config['options'] as $option => $value) {
            if (in_array($option, ['c', 'config'])) {
                switch (gettype($value)) {
                    case 'string':
                        $additionalConfigFiles[] = $value;
                        break;
                    case 'array':
                        foreach ($value as $item) {
                            if (!is_string($item)) {
                                throw new Exception(sprintf(
                                    'Unknown value "%s" for option "%s"',
                                    $item,
                                    $option
                                ), ExitApp::BAD_USER_INTERACTION);
                            }

                            $additionalConfigFiles[] = $item;
                        }
                        break;
                    default:
                        throw new Exception(sprintf(
                            'Unknown value "%s" for option "%s"',
                            $value,
                            $option
                        ), ExitApp::BAD_USER_INTERACTION);
                }
            }
        }

        foreach ($additionalConfigFiles as $additionalConfigFile) {
            $this->addConfigFile($additionalConfigFile);
        }

        return $this;
    }
protected function loadAdditionalConfigFiles() {
        $additionalConfigFiles = [];

        foreach ($this->config['options'] as $option => $value) {
            if (in_array($option, ['c', 'config'])) {
                switch (gettype($value)) {
                    case 'string':
                        $additionalConfigFiles[] = $value;
                        break;
                    case 'array':
                        foreach ($value as $item) {
                            if (!is_string($item)) {
                                throw new Exception(sprintf(
                                    'Unknown value "%s" for option "%s"',
                                    $item,
                                    $option
                                ), ExitApp::BAD_USER_INTERACTION);
                            }

                            $additionalConfigFiles[] = $item;
                        }
                        break;
                    default:
                        throw new Exception(sprintf(
                            'Unknown value "%s" for option "%s"',
                            $value,
                            $option
                        ), ExitApp::BAD_USER_INTERACTION);
                }
            }
        }

        foreach ($additionalConfigFiles as $additionalConfigFile) {
            $this->addConfigFile($additionalConfigFile);
        }

        return $this;
    }
protected function loadAdditionalConfigFiles ( ) { $ additionalConfigFiles = [ ] ; foreach ( $ this -> config [ 'options' ] as $ option => $ value ) { if ( in_array ( $ option , [ 'c' , 'config' ] ) ) { switch ( gettype ( $ value ) ) { case 'string' : $ additionalConfigFiles [ ] = $ value ; break ; case 'array' : foreach ( $ value as $ item ) { if ( ! is_string ( $ item ) ) { throw new Exception ( sprintf ( 'Unknown value "%s" for option "%s"' , $ item , $ option ) , ExitApp :: BAD_USER_INTERACTION ) ; } $ additionalConfigFiles [ ] = $ item ; } break ; default : throw new Exception ( sprintf ( 'Unknown value "%s" for option "%s"' , $ value , $ option ) , ExitApp :: BAD_USER_INTERACTION ) ; } } } foreach ( $ additionalConfigFiles as $ additionalConfigFile ) { $ this -> addConfigFile ( $ additionalConfigFile ) ; } return $ this ; }
Parse additional configuration files given as options

@return self Returns itself

@throws Exception on error
Parse additional configuration files given as options