/** * @param $id * @param $lang * @return Station * @throws Exception */ public static function getStationFromID($id, $lang) { $stationobject = irail\stations\Stations::getStationFromID($id); if ($stationobject) { return stations::transformNewToOldStyle($stationobject, $lang); } else { throw new Exception("Error: could not find a station with id " . $stationobject->{"@id"} . ".", 300); } }
/** * @param $id * @param $lang * @return Station * @throws Exception */ public static function getStationFromID($id, $lang) { $stationobject = irail\stations\Stations::getStationFromID($id); if ($stationobject) { return self::transformNewToOldStyle($stationobject, $lang); } else { throw new Exception('Could not find a station with id ' . $id . '.', 404); } }