123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <?php
- namespace TencentCloud\Common\Profile;
- class ClientProfile
- {
-
- public static $SIGN_HMAC_SHA1 = "HmacSHA1";
-
- public static $SIGN_HMAC_SHA256 = "HmacSHA256";
-
- public static $SIGN_TC3_SHA256 = "TC3-HMAC-SHA256";
-
- public static $ZH_CN = "zh-CN";
-
- public static $EN_US = "en-US";
-
- private $httpProfile;
-
- private $signMethod;
-
- private $unsignedPayload;
-
- private $checkPHPVersion;
-
- private $language;
-
- public function __construct($signMethod = null, $httpProfile = null)
- {
- $this->signMethod = $signMethod ? $signMethod : ClientProfile::$SIGN_TC3_SHA256;
- $this->httpProfile = $httpProfile ? $httpProfile : new HttpProfile();
- $this->unsignedPayload = false;
- $this->checkPHPVersion = true;
-
- }
-
- public function setSignMethod($signMethod)
- {
- $this->signMethod = $signMethod;
- }
-
- public function setHttpProfile($httpProfile)
- {
- $this->httpProfile = $httpProfile;
- }
-
- public function getSignMethod()
- {
- return $this->signMethod;
- }
-
- public function setUnsignedPayload($flag)
- {
- $this->unsignedPayload = $flag;
- }
-
- public function getUnsignedPayload()
- {
- return $this->unsignedPayload;
- }
- public function getCheckPHPVersion()
- {
- return $this->checkPHPVersion;
- }
- public function setCheckPHPVersion($flag)
- {
- $this->checkPHPVersion = $flag;
- }
- public function getLanguage()
- {
- return $this->language;
- }
-
- public function setLanguage($language)
- {
- $this->language = $language;
- }
-
- public function getHttpProfile()
- {
- return $this->httpProfile;
- }
- }
|