foreach ($unitsArr as $unitArr) {
    $unitName = $terms[$unitArr[1]]->getString();
    $unitDescription = $terms[$unitArr[13]]->getString();
    $unit = new Unit($unitArr[0], $unitName, $unitArr[2], $unitArr[3], $unitArr[4], $unitArr[5], $unitArr[6], $unitArr[7], $unitArr[8], explode(",", $unitArr[9]), explode(",", $unitArr[10]), explode(",", $unitArr[11]), $unitArr[12], $unitDescription, $unitArr[14], $unitArr[15]);
    if (isset($battleModLinks[$unit->getId()])) {
        $unit->setBattleMods($battleModLinks[$unit->getId()]);
    }
    $units[$unit->getId()] = $unit;
}
$staticData->setUnits($units);
$technologiesArr = $technologyConn->getAllTechnologies();
foreach ($technologiesArr as $technologyArr) {
    $techName = $terms[$technologyArr[1]]->getString();
    $techDescription = $terms[$technologyArr[11]]->getString();
    $technology = new Technology($technologyArr[0], $techName, $technologyArr[2], $technologyArr[3], $technologyArr[4], explode(",", $technologyArr[5]), explode(",", $technologyArr[6]), $technologyArr[7], $technologyArr[8], $technologyArr[9], $technologyArr[10], $techDescription, $technologyArr[12]);
    $technologies[$technology->getId()] = $technology;
}
$staticData->setTechnologies($technologies);
$productionModsArr = $productionModConn->getAllProductionMods();
$productionModLinks = array();
foreach ($productionModsArr as $productionModArr) {
    $productionMod = new ProductionMod($productionModArr[0], $productionModArr[1], $productionModArr[2], $productionModArr[3], $productionModArr[4], $productionModArr[5], $productionModArr[6]);
    $productionMods[$productionMod->getId()] = $productionMod;
    if ($productionMod->getTargetClassId() == 'Building') {
        $productionModLinks[$productionMod->getTargetId()][] = $productionMod;
    }
}
$buildingsArr = $buildingConn->getAllBuildings();
foreach ($buildingsArr as $buildingArr) {
    $buildingName = $terms[$buildingArr[1]]->getString();
    $buildingDescription = $terms[$buildingArr[13]]->getString();