public static function FromDatabase($row) { $id = $row['class']; $planetType = ResourceParser::Instance()->GetPlanetTypeByID($id); $variation = array(); $variation[] = PlanetData::FromDatabase($row); return new PlanetType($planetType->PlanetClass(), $id, $planetType->AllowedBuildings(), $variation); }