classes/Options.php
public static function loadJSON($filepath,$prefix_path=null){
    $data = file_get_contents($filepath);
    $results = $data?json_decode($data,true):[];
    if($results) {
      $results = static::filterWith(["load.json", "load"], $results);
      static::loadArray($results,$prefix_path);
    }
  }
public static function loadJSON($filepath,$prefix_path=null){
    $data = file_get_contents($filepath);
    $results = $data?json_decode($data,true):[];
    if($results) {
      $results = static::filterWith(["load.json", "load"], $results);
      static::loadArray($results,$prefix_path);
    }
  }
public static function loadJSON ( $ filepath , $ prefix_path = null ) { $ data = file_get_contents ( $ filepath ) ; $ results = $ data ? json_decode ( $ data , true ) : [ ] ; if ( $ results ) { $ results = static :: filterWith ( [ "load.json" , "load" ] , $ results ) ; static :: loadArray ( $ results , $ prefix_path ) ; } }
Load a JSON configuration file
@param  string $filepath The path of the JSON config file
@param  string $prefix_path You can insert/update the loaded array to a specific key path, if omitted it will be merged with the whole dictionary
Load a JSON configuration file