signMethod = $signMethod ? $signMethod : ClientProfile::$SIGN_TC3_SHA256; $this->httpProfile = $httpProfile ? $httpProfile : new HttpProfile(); $this->unsignedPayload = false; $this->checkPHPVersion = true; //$this->language = ClientProfile::$ZH_CN; } /** * 设置签名算法 * @param string $signMethod 签名方法,目前支持SHA256,SHA1, TC3 */ public function setSignMethod($signMethod) { $this->signMethod = $signMethod; } /** * 设置http相关参数 * @param HttpProfile $httpProfile http相关参数 */ public function setHttpProfile($httpProfile) { $this->httpProfile = $httpProfile; } /** * 获取签名方法 * @return null|string 签名方法 */ public function getSignMethod() { return $this->signMethod; } /** * 设置是否忽略内容签名 * @param bool $flag true表示忽略签名 */ public function setUnsignedPayload($flag) { $this->unsignedPayload = $flag; } /** * 获取是否忽略内容签名标志位 * @return bool */ 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; } /** * @param string $language Valid values: zh-CN, en-US */ public function setLanguage($language) { $this->language = $language; } /** * 获取http选项实例 * @return null|HttpProfile http选项实例 */ public function getHttpProfile() { return $this->httpProfile; } }