You are here

public function S3Url::__construct in AmazonS3 7.2

Override __construct() to default scheme to s3.

Parameters

string $bucket: The bucket to use for the URL.

string $key: (optional) Key for the URL.

File

src/S3Url.php, line 24

Class

S3Url
Represents an s3:// stream URL.

Namespace

Drupal\amazons3

Code

public function __construct($bucket, $key = null) {
  if ($key) {
    $key = '/' . $key;
  }
  parent::__construct('s3', $bucket, null, null, null, $key);
}