public function parseFile(string $path): bool
    {
        static::$iteration++;
        if (static::$iteration > 10) exit();
        if (in_array($path, $this->parsed_files)) {
            // The file has already been parsed, don't parse it again
            return true;
        }
        $this->parsed_files[] = $path;
        if (is_readable($path)) {
            $array = include($path);
        } else {
            if (isset(Core::i()->log)) {
                Core::i()->log->debug('Config path ' . $path . ' could not be read.');
            }
            return false;
        }
        if (!is_array($array)) {
            if (isset(Core::i()->log)) {
                Core::i()->log->debug('Config file ' . $path . ' is not an array.');
            }
            return false;
        }
        $this->parseArray($array);
        return true;
    }
public function parseFile(string $path): bool
    {
        static::$iteration++;
        if (static::$iteration > 10) exit();
        if (in_array($path, $this->parsed_files)) {
            // The file has already been parsed, don't parse it again
            return true;
        }
        $this->parsed_files[] = $path;
        if (is_readable($path)) {
            $array = include($path);
        } else {
            if (isset(Core::i()->log)) {
                Core::i()->log->debug('Config path ' . $path . ' could not be read.');
            }
            return false;
        }
        if (!is_array($array)) {
            if (isset(Core::i()->log)) {
                Core::i()->log->debug('Config file ' . $path . ' is not an array.');
            }
            return false;
        }
        $this->parseArray($array);
        return true;
    }
public function parseFile ( string $ path ) : bool { static :: $ iteration ++ ; if ( static :: $ iteration > 10 ) exit ( ) ; if ( in_array ( $ path , $ this -> parsed_files ) ) { // The file has already been parsed, don't parse it again return true ; } $ this -> parsed_files [ ] = $ path ; if ( is_readable ( $ path ) ) { $ array = include ( $ path ) ; } else { if ( isset ( Core :: i ( ) -> log ) ) { Core :: i ( ) -> log -> debug ( 'Config path ' . $ path . ' could not be read.' ) ; } return false ; } if ( ! is_array ( $ array ) ) { if ( isset ( Core :: i ( ) -> log ) ) { Core :: i ( ) -> log -> debug ( 'Config file ' . $ path . ' is not an array.' ) ; } return false ; } $ this -> parseArray ( $ array ) ; return true ; }
Process a single file's configuration settings.

@param string $path The path to the configuration file

@return bool True if the file is parsed successfully or skipped because it has already been parsed
Process a single file s configuration settings .