public static function getProfile($regionId, $accessKeyId, $accessSecret) { $credential = new Credential($accessKeyId, $accessSecret); self::$profile = new DefaultProfile($regionId, $credential); return self::$profile; }
public function __construct($accessKey, $secretKey) { $iClientProfile = DefaultProfile::getProfile("cn-hangzhou", $accessKey, $secretKey); $this->client = new DefaultAcsClient($iClientProfile); // 图片检测 $this->request = new Green\ImageDetectionRequest(); }