private function setPathJson($pathJson) { $json = file_get_contents($pathJson); $decoded = json_decode($json, true); $this->limits = $decoded['limits']; $this->targets = $decoded['targets']; }
public static function create($pathJson) { $mapJson = new MapJson(); $mapJson->setPathJson($pathJson); return $mapJson; }