JansenFelipe\OMR\Maps\MapJson::setPathJson PHP Метод

setPathJson() приватный Метод

private setPathJson ( $pathJson )
    private function setPathJson($pathJson)
    {
        $json = file_get_contents($pathJson);
        $decoded = json_decode($json, true);
        $this->limits = $decoded['limits'];
        $this->targets = $decoded['targets'];
    }

Usage Example

Пример #1
0
 public static function create($pathJson)
 {
     $mapJson = new MapJson();
     $mapJson->setPathJson($pathJson);
     return $mapJson;
 }