private static function getBolClient()
 {
     if (!self::$bolClient) {
         $bol_api_key = '2C42709CDE6B4AF49B874E38CF1DFD12';
         $bol_api_format = 'json';
         $bol_api_debug_mode = 0;
         $bol_api_library_version = 'v.2.0.0';
         self::$bolClient = new Client($bol_api_key, $bol_api_format, $bol_api_debug_mode);
     }
     return self::$bolClient;
 }
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);