コード例 #1
0
 /**
  * @param exodBearerToken $exodBearerToken
  *
  * @return exodAppBusiness
  */
 public function getExodApp(exodBearerToken $exodBearerToken)
 {
     $exodConfig = new exodConfig();
     $exodConfig->checkComplete();
     exodCurl::setSslVersion($exodConfig->getSSLVersion());
     exodCurl::setIpV4($exodConfig->getResolveIpV4());
     if ($exodConfig->getClientType() == exodApp::TYPE_BUSINESS) {
         $exodTenant = new exodTenant();
         $exodTenant->setTenantId($exodConfig->getTentantId());
         $exodTenant->setTenantName($exodConfig->getTenantName());
         $app = exodAppBusiness::getInstance($exodBearerToken, $exodConfig->getClientId(), $exodConfig->getClientSecret(), $exodTenant);
         $app->setIpResolveV4($exodConfig->getResolveIpV4());
     } elseif ($exodConfig->getClientType() == exodApp::TYPE_PUBLIC) {
         $app = exodAppPublic::getInstance($exodBearerToken, $exodConfig->getClientId(), $exodConfig->getClientSecret());
         $app->setIpResolveV4($exodConfig->getResolveIpV4());
     }
     //		$exodAppBusiness->setSslVersion(4);
     return $app;
 }
コード例 #2
0
 /**
  * @param exodBearerToken $exod_bearer_token
  * @param                 $client_id
  * @param                 $client_secret
  *
  * @return exodAppPublic
  */
 public static function getInstance(exodBearerToken $exod_bearer_token, $client_id, $client_secret)
 {
     self::$instance = new self($exod_bearer_token, $client_id, $client_secret);
     return self::$instance;
 }