public getBucketLocation ( string $bucketName ) : string | ||
$bucketName | string | A bucket name. |
return | string | Returns bucket location Valid Values: EU | eu-west-1 | eu-central-1 | us-west-1 | us-west-2 | ap-southeast-1 | ap-northeast-1 | ap-northeast-2 | sa-east-1 | empty string (for the US Classic Region) |
public function getBucketLocation($bucketName)
{
$response = $this->getBucketSubresource($bucketName, 'location');
$sxml = simplexml_load_string($response->getRawContent());
$location = (string) $sxml;
return $location;
}