11 lines
410 B
PHP
11 lines
410 B
PHP
<?php
|
|
require_once __DIR__ . '/labdb.class.php';
|
|
final class MapCatalog {
|
|
public static function schema(): ?array {
|
|
$path=lab_config()['catalog'];
|
|
if(!is_file($path)||!is_readable($path))return null;
|
|
$schema=json_decode((string)file_get_contents($path),true);
|
|
return is_array($schema)&&isset($schema['maps']['fields'],$schema['maps']['grids'])?$schema['maps']:null;
|
|
}
|
|
}
|