public function readData() {
        if (empty($this->names)) {
            $this->names = $this->generateNames();
        }
        //Add default configs
        $defaultPath = dirname(__DIR__) . DIRECTORY_SEPARATOR . $this->configPathDefault;
        $paths = [$defaultPath, $this->path];
        $confData = [];
        foreach ($paths as $basePath) {
            foreach ($this->names as $_name_) {
                $_fileName_ = $this->normalizeConfigPath($_name_, $basePath);
                if (($fileConfig = $this->readFileData($_fileName_)) !== null) {
                    $confData[] = $fileConfig;
                }
            }
        }
        if (empty($confData)) {
            return [];
        } elseif (count($confData) === 1) {
            return reset($confData);
        }
        return static::mergeConfigs(...$confData);
    }
public function readData() {
        if (empty($this->names)) {
            $this->names = $this->generateNames();
        }
        //Add default configs
        $defaultPath = dirname(__DIR__) . DIRECTORY_SEPARATOR . $this->configPathDefault;
        $paths = [$defaultPath, $this->path];
        $confData = [];
        foreach ($paths as $basePath) {
            foreach ($this->names as $_name_) {
                $_fileName_ = $this->normalizeConfigPath($_name_, $basePath);
                if (($fileConfig = $this->readFileData($_fileName_)) !== null) {
                    $confData[] = $fileConfig;
                }
            }
        }
        if (empty($confData)) {
            return [];
        } elseif (count($confData) === 1) {
            return reset($confData);
        }
        return static::mergeConfigs(...$confData);
    }
public function readData ( ) { if ( empty ( $ this -> names ) ) { $ this -> names = $ this -> generateNames ( ) ; } //Add default configs $ defaultPath = dirname ( __DIR__ ) . DIRECTORY_SEPARATOR . $ this -> configPathDefault ; $ paths = [ $ defaultPath , $ this -> path ] ; $ confData = [ ] ; foreach ( $ paths as $ basePath ) { foreach ( $ this -> names as $ _name_ ) { $ _fileName_ = $ this -> normalizeConfigPath ( $ _name_ , $ basePath ) ; if ( ( $ fileConfig = $ this -> readFileData ( $ _fileName_ ) ) !== null ) { $ confData [ ] = $ fileConfig ; } } } if ( empty ( $ confData ) ) { return [ ] ; } elseif ( count ( $ confData ) === 1 ) { return reset ( $ confData ) ; } return static :: mergeConfigs ( ... $ confData ) ; }
Read configs and merge
@return array
Read configs and merge