コード例 #1
0
 public static function getGoogleClient($clientId, $clientSecret)
 {
     if (!is_null(self::$_googleClient)) {
         return self::$_googleClient;
     }
     // add google client library to include path
     set_include_path(get_include_path() . PATH_SEPARATOR . KALTURA_ROOT_PATH . '/vendor/google-api-php-client/src/');
     require_once 'Google_Client.php';
     $client = new Google_Client();
     $client->setClientId($clientId);
     $client->setClientSecret($clientSecret);
     self::$_googleClient = $client;
     return $client;
 }