$clientId, 'accessToken' => $accessToken, 'tokenCreateTime' => $tokenCreateTime, 'tokenExpiresIn' => $tokenExpiresIn ); } file_put_contents(__DIR__ . self::$CACHE_PATH, json_encode($tokens)); } /** * Determines from the Configuration if caching is currently enabled/disabled * * @param $config * @return bool */ public static function isEnabled($config) { $config = ($config && is_array($config)) ? $config : PPConfigManager::getInstance()->getConfigHashmap(); if (array_key_exists("cache.enabled", $config)) { $value = $config['cache.enabled']; return (trim($value) == 'true') ? true : false; } return false; } }