Deprecated: Return type of YDataTable::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/bdavid/prod/georef/yamldoc/ydclasses/ydata.inc.php on line 428

Deprecated: Return type of YamlDataTable::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/bdavid/prod/georef/yamldoc/ydclasses/yamldata.inc.php on line 295
yaml pub]
Menu : html yaml json PhpSrc edit check reindex dump unset
* 

Code source Php de cregions
<?php
/*PhpDoc:
title: sélection des geohisto/regions non périmées
*/
if (isset($ydcheckWriteAccessForPhpCode))
  return ['benoit'];

require_once __DIR__.'/../inc.php';

$result = [
  'title'=> "sélection dans geohisto/regions des régions courantes",
  'data'=> [],
];
if (!($regions = new_doc('geohisto/regions')))
  die("Erreur d'ouverture de regions");
foreach ($regions->extract('/data') as $region) {
  //echo "<pre>region="; print_r($region); echo "</pre>\n";
  if (isset($region['successors']))
    continue;
  unset($region['start_datetime']);
  unset($region['end_datetime']);
  unset($region['ancestors']);
  unset($region['KEY']);
  $region['chef_lieu'] = $region['chef_lieu'][count($region['chef_lieu'])-1];
  $result['data'][] = $region;
}
return $result;