本文整理匯總了PHP中Countries::getDutchName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Countries::getDutchName方法的具體用法?PHP Countries::getDutchName怎麽用?PHP Countries::getDutchName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Countries
的用法示例。
在下文中一共展示了Countries::getDutchName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: error_reporting
include_once "Allerhande.php";
include_once "countrycolors.php";
include_once "huemanager.php";
include_once "bolmanager.php";
include_once "spotify.php";
include_once "schiphol.php";
//Getting those annoying notices and warnings out of the way
error_reporting(0);
// ini_set('display_errors', 1);
$flightId = $_REQUEST['flightId'];
$numberOfRecipes = $_REQUEST['numberOfRecipes'];
$airportCode = Transavia::getCountryCodeForJourney($flightId);
$countryCode = CountryCode::getCountryCodeForIATA($airportCode);
$fileName = "cache/cache.json." . $flightId . $numberOfRecipes;
$jsonObject = new StdClass();
if (file_exists($fileName)) {
$jsonObject = json_decode(file_get_contents($fileName));
} else {
$jsonObject->recepten = Recepten::getReceptenForCountry($countryCode, $numberOfRecipes);
$jsonObject->colors->RGB = CountryColors::getMainColors($countryCode);
$jsonObject->colors->HUE = CountryColors::array_RGB_TO_HUE($jsonObject->colors->RGB);
$jsonObject->producten = BolManager::getProductsForCountry($search = Countries::getDutchName($countryCode));
//$jsonObject->bagbeltNumber = Schiphol::getBagbeltNumber($journeyCode);
$jsonObject->spotify = Spotify::getTrack($countryCode);
foreach ($jsonObject->recepten as &$r) {
$r->receptimagehd = Allerhande::getHighResImage($r->recepturl);
}
file_put_contents($fileName, json_encode($jsonObject));
}
//HueManager::setColors($jsonObject->colors->HUE);
echo json_encode($jsonObject);