$value) { if (preg_match('/attr/',$key)) { $regions[$value["cd"]] = $value["name"]; } } return $regions; } /** * returns array of prefectures under the specified region. * * @param string $region_id * @return array of prefectures */ public function get_prefectures($region_id) { if ($region_id == "01") { return array("010000" => "北海道"); } else if ($region_id == "55") { return array("470000" => "沖縄県"); } $xml_segment = &parent::get_xml_segment( JALAN_AREA_SEARCH_URL . "?key=" . JALAN_API_KEY . "®=" . $region_id, array("Results","Area","Region","Prefecture") ); $prefectures = array(); foreach ($xml_segment as $key => $value) { if (preg_match('/attr/',$key)) { $prefectures[$value["cd"]] = $value["name"]; } } return $prefectures; } /** * returns the array of large areas under the specified region * * @param $prefecture_id prefecture ID or (in hokkaido,okinawa's cases, region id) * @return array of large areas */ public function get_large_areas($prefecture_id) { $xml_segment = &parent::get_xml_segment( JALAN_AREA_SEARCH_URL . "?key=" . JALAN_API_KEY . "&pref=" . $prefecture_id, array("Results","Area","Region","Prefecture","LargeArea") ); $large_areas = array(); foreach ($xml_segment as $key => $value) { if (preg_match('/attr/',$key)) { $large_areas[$value["cd"]] = $value["name"]; } } return $large_areas; } } ?>
Fatal error: Uncaught Error: Class 'access_xml' not found in /home/vnao/pub/smart_tabi/models/jalan_large_area_hotels.php:19 Stack trace: #0 /home/vnao/pub/smart_tabi/hotels_controller.php(8): require_once() #1 /home/vnao/pub/smart_tabi/large_areas_controller.php(11): require_once('/home/vnao/pub/...') #2 /home/vnao/pub/smart_tabi/prefectures_controller.php(11): require_once('/home/vnao/pub/...') #3 /home/vnao/pub/smart_tabi/index_controller.php(14): require_once('/home/vnao/pub/...') #4 /home/vnao/pub/smart_tabi/index.php(13): require_once('/home/vnao/pub/...') #5 {main} thrown in /home/vnao/pub/smart_tabi/models/jalan_large_area_hotels.php on line 19