src/wcmf/lib/config/impl/InifileConfiguration.php
protected function processFile($filename, $configArray=[], $parsedFiles=[]) {
    // avoid circular includes
    if (!in_array($filename, $parsedFiles)) {
      $parsedFiles[] = $filename;

      $content = $this->parseIniFile($filename);

      // process includes
      $includes = $this->getConfigIncludes($content);
      if ($includes) {
        $this->processValue($includes);
        foreach ($includes as $include) {
          $result = $this->processFile($this->configPath.$include, $configArray, $parsedFiles);
          $configArray = $this->configMerge($configArray, $result['config'], true);
          $parsedFiles = $result['files'];
        }
      }

      // process self
      $configArray = $this->configMerge($configArray, $content, true);
    }
    return ['config' => $configArray, 'files' => $parsedFiles];
  }
protected function processFile($filename, $configArray=[], $parsedFiles=[]) {
    // avoid circular includes
    if (!in_array($filename, $parsedFiles)) {
      $parsedFiles[] = $filename;

      $content = $this->parseIniFile($filename);

      // process includes
      $includes = $this->getConfigIncludes($content);
      if ($includes) {
        $this->processValue($includes);
        foreach ($includes as $include) {
          $result = $this->processFile($this->configPath.$include, $configArray, $parsedFiles);
          $configArray = $this->configMerge($configArray, $result['config'], true);
          $parsedFiles = $result['files'];
        }
      }

      // process self
      $configArray = $this->configMerge($configArray, $content, true);
    }
    return ['config' => $configArray, 'files' => $parsedFiles];
  }
protected function processFile ( $ filename , $ configArray = [ ] , $ parsedFiles = [ ] ) { // avoid circular includes
 if ( ! in_array ( $ filename , $ parsedFiles ) ) { $ parsedFiles [ ] = $ filename ; $ content = $ this -> parseIniFile ( $ filename ) ; // process includes
 $ includes = $ this -> getConfigIncludes ( $ content ) ; if ( $ includes ) { $ this -> processValue ( $ includes ) ; foreach ( $ includes as $ include ) { $ result = $ this -> processFile ( $ this -> configPath . $ include , $ configArray , $ parsedFiles ) ; $ configArray = $ this -> configMerge ( $ configArray , $ result [ 'config' ] , true ) ; $ parsedFiles = $ result [ 'files' ] ; } } // process self
 $ configArray = $ this -> configMerge ( $ configArray , $ content , true ) ; } return [ 'config' => $ configArray , 'files' => $ parsedFiles ] ; }
Process the given file recursively
@param $filename The filename
@param $configArray Configuration array
@param $parsedFiles Parsed files
@return Associative array with keys 'config' (configuration array) and 'files'
(array of parsed files)
Process the given file recursively