本文整理汇总了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);