當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Countries::getDutchName方法代碼示例

本文整理匯總了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);
開發者ID:BastiaanGrisel,項目名稱:dutchopenhackathon,代碼行數:31,代碼來源:getRecepten.php


注:本文中的Countries::getDutchName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。