WIP GWR Umbau mit Netzgebiet und Adressstatus

This commit is contained in:
Frank Schubert
2022-10-04 12:43:54 +02:00
parent 24840c04d1
commit 9db6ae59c3
12 changed files with 434 additions and 16 deletions

View File

@@ -9,4 +9,25 @@ class AddressDB {
$this->log = mfLoghandler::singleton();
}
public function import($input) {
$path = __DIR__."/Importer/";
$dir = opendir($path);
while(($file = readdir($dir)) !== false) {
if(substr($file, 0, 1) == ".") continue;
if(substr($file, -4) != ".php") continue;
if(!is_file($path.$file)) continue;
require_once $path.$file;
$classname = "AddressDB_Importer_".ucfirst(substr($file, 0, strlen($file)-4));
if(class_exists($classname)) {
$importer = new $classname();
if($importer->isValid($input)) {
return $importer->import();
}
}
}
}
}