classes/Collections/Elements.php
protected function loadConfig()
    {
        // Start with empty config
        $this->config = [];

        // Build a lit of all the paths
        $dir = config_path('decoy').'/';
        $files = [];
        if (is_readable($dir.'elements.yaml')) {
            $files[] = $dir.'elements.yaml';
        }
        if (is_dir($dir.'elements')) {
            $files = array_merge($files, glob($dir.'elements/*.yaml'));
        }
        if (!count($files)) {
            return;
        }

        // Loop though config files and merge them together
        foreach ($files as $file) {

            // If an array found ...
            if (($config = Yaml::parse(file_get_contents($file)))
                && is_array($config)) {

                // Merge it in
                $this->config = array_replace_recursive($this->config, $config);
            }
        }
    }
protected function loadConfig()
    {
        // Start with empty config
        $this->config = [];

        // Build a lit of all the paths
        $dir = config_path('decoy').'/';
        $files = [];
        if (is_readable($dir.'elements.yaml')) {
            $files[] = $dir.'elements.yaml';
        }
        if (is_dir($dir.'elements')) {
            $files = array_merge($files, glob($dir.'elements/*.yaml'));
        }
        if (!count($files)) {
            return;
        }

        // Loop though config files and merge them together
        foreach ($files as $file) {

            // If an array found ...
            if (($config = Yaml::parse(file_get_contents($file)))
                && is_array($config)) {

                // Merge it in
                $this->config = array_replace_recursive($this->config, $config);
            }
        }
    }
protected function loadConfig ( ) { // Start with empty config $ this -> config = [ ] ; // Build a lit of all the paths $ dir = config_path ( 'decoy' ) . '/' ; $ files = [ ] ; if ( is_readable ( $ dir . 'elements.yaml' ) ) { $ files [ ] = $ dir . 'elements.yaml' ; } if ( is_dir ( $ dir . 'elements' ) ) { $ files = array_merge ( $ files , glob ( $ dir . 'elements/*.yaml' ) ) ; } if ( ! count ( $ files ) ) { return ; } // Loop though config files and merge them together foreach ( $ files as $ file ) { // If an array found ... if ( ( $ config = Yaml :: parse ( file_get_contents ( $ file ) ) ) && is_array ( $ config ) ) { // Merge it in $ this -> config = array_replace_recursive ( $ this -> config , $ config ) ; } } }
Load the config file and store it internally

@return void
Load the config file and store it internally