src/Configuration/Config.php
/**
     * Load the configuration from the various YML files.
     */
Load the configuration from the various YML files.
Load the configuration from the various YML files .
private function parseConfig(): array
    {
        $general = new GeneralParser($this->projectDir);
        $config = new Collection([
            'general' => $general->parse(),
        ]);
        $taxonomy = new TaxonomyParser($this->projectDir);
        $config['taxonomies'] = $taxonomy->parse();
        $contentTypes = new ContentTypesParser($this->projectDir, $config->get('general'), $this->defaultLocale, $this->locales);
        $config['contenttypes'] = $contentTypes->parse();
        $menu = new MenuParser($this->projectDir);
        $config['menu'] = $menu->parse();
        $this->pathResolver = new PathResolver($this->projectDir, $config->get('general')->get('theme'), $this->publicFolder);
        $theme = new ThemeParser($this->projectDir, $this->getPath('theme'));
        $config['theme'] = $theme->parse();
        $permissions = new PermissionsParser($this->projectDir);
        $config['permissions'] = $permissions->parse();
        $timestamps = $this->getConfigFilesTimestamps($general, $taxonomy, $contentTypes, $menu, $theme, $permissions);
        return [
            DeepCollection::deepMake($config),
            $timestamps,
        ];
    }
private function parseConfig ( ) : array { $ general = new GeneralParser ( $ this -> projectDir ) ; $ config = new Collection ( [ 'general' => $ general -> parse ( ) , ] ) ; $ taxonomy = new TaxonomyParser ( $ this -> projectDir ) ; $ config [ 'taxonomies' ] = $ taxonomy -> parse ( ) ; $ contentTypes = new ContentTypesParser ( $ this -> projectDir , $ config -> get ( 'general' ) , $ this -> defaultLocale , $ this -> locales ) ; $ config [ 'contenttypes' ] = $ contentTypes -> parse ( ) ; $ menu = new MenuParser ( $ this -> projectDir ) ; $ config [ 'menu' ] = $ menu -> parse ( ) ; $ this -> pathResolver = new PathResolver ( $ this -> projectDir , $ config -> get ( 'general' ) -> get ( 'theme' ) , $ this -> publicFolder ) ; $ theme = new ThemeParser ( $ this -> projectDir , $ this -> getPath ( 'theme' ) ) ; $ config [ 'theme' ] = $ theme -> parse ( ) ; $ permissions = new PermissionsParser ( $ this -> projectDir ) ; $ config [ 'permissions' ] = $ permissions -> parse ( ) ; $ timestamps = $ this -> getConfigFilesTimestamps ( $ general , $ taxonomy , $ contentTypes , $ menu , $ theme , $ permissions ) ; return [ DeepCollection :: deepMake ( $ config ) , $ timestamps , ] ; }
Load the configuration from the various YML files.
Load the configuration from the various YML files .
// If we're parsing the config, we'll also need to pre-initialise // the PathResolver, because we need to know the theme path. // @todo Add these config files if needed, or refactor them out otherwise //'permissions' => $this->parseConfigYaml('permissions.yml'), //'extensions' => $this->parseConfigYaml('extensions.yml'),