DefaultProfile::getProfile PHP Method

getProfile() public static method

public static getProfile ( $regionId, $accessKeyId, $accessSecret )
    public static function getProfile($regionId, $accessKeyId, $accessSecret)
    {
        $credential = new Credential($accessKeyId, $accessSecret);
        self::$profile = new DefaultProfile($regionId, $credential);
        return self::$profile;
    }

Usage Example

Example #1
0
 public function __construct($accessKey, $secretKey)
 {
     $iClientProfile = DefaultProfile::getProfile("cn-hangzhou", $accessKey, $secretKey);
     $this->client = new DefaultAcsClient($iClientProfile);
     // 图片检测
     $this->request = new Green\ImageDetectionRequest();
 }
All Usage Examples Of DefaultProfile::getProfile