libSmalldb  v0.7-66-gb94d22a
Public Member Functions | List of all members
JsonDirReader Class Reference

Public Member Functions

 __construct (string $base_dir)
 Constructor. More...
 
 getBaseDir ()
 Get base directory. More...
 
 registerFileReader (IMachineDefinitionReader $file_reader)
 Register a file reader which will be used to parse the files as they are loaded. More...
 
 getFileReaders ()
 Get list of registered file readers. More...
 
 detectConfiguration ()
 Scan for the configuration and build list of files, but do not load the files. More...
 
 getLatestMTime ()
 
 loadConfiguration ()
 Load the configuration from the JSON files. More...
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $base_dir)

Constructor.

Parameters
string$base_dirDirectory where JSON files are located.

Member Function Documentation

◆ getBaseDir()

getBaseDir ( )

Get base directory.

◆ registerFileReader()

registerFileReader ( IMachineDefinitionReader  $file_reader)

Register a file reader which will be used to parse the files as they are loaded.

◆ getFileReaders()

getFileReaders ( )

Get list of registered file readers.

Returns
IMachineDefinitionReader[]

◆ detectConfiguration()

detectConfiguration ( )

Scan for the configuration and build list of files, but do not load the files.

This method may be called many times, but it will detect the configuration only once.

◆ getLatestMTime()

getLatestMTime ( )
Returns
int Modification time of the most recently changed config file found.

◆ loadConfiguration()

loadConfiguration ( )

Load the configuration from the JSON files.

See also
IMachineDefinitionReader[] $postprocess_list