You are here

public function S3::__construct in Flysystem - S3 8

Same name and namespace in other branches
  1. 2.0.x src/Flysystem/S3.php \Drupal\flysystem_s3\Flysystem\S3::__construct()

Constructs an S3 object.

Parameters

\Aws\S3\S3Client $client: The S3 client.

\League\Flysystem\Config $config: The configuration.

File

src/Flysystem/S3.php, line 80

Class

S3
Drupal plugin for the "S3" Flysystem adapter.

Namespace

Drupal\flysystem_s3\Flysystem

Code

public function __construct(S3Client $client, Config $config) {
  $this->client = $client;
  $this->bucket = $config
    ->get('bucket', '');
  $this->prefix = $config
    ->get('prefix', '');
  $this->isPublic = $config
    ->get('public', FALSE);
  $this->options = $config
    ->get('options', []);
  $this->urlPrefix = $this
    ->calculateUrlPrefix($config);
}