You are here

function StreamWrapper::setUri in AmazonS3 7.2

8 calls to StreamWrapper::setUri()
StreamWrapper::dirname in src/StreamWrapper.php
StreamWrapper::dir_opendir in src/StreamWrapper.php
StreamWrapper::mkdir in src/StreamWrapper.php
StreamWrapper::rename in src/StreamWrapper.php
Override rename() to handle setting the URI on move.
StreamWrapper::rmdir in src/StreamWrapper.php

... See full list

File

src/StreamWrapper.php, line 188
Drupal stream wrapper implementation for Amazon S3

Class

StreamWrapper
@file Drupal stream wrapper implementation for Amazon S3

Namespace

Drupal\amazons3

Code

function setUri($uri) {

  // file_stream_wrapper_get_instance_by_scheme() assumes that all schemes
  // can work without a directory, but S3 requires a bucket. If a raw scheme
  // is passed in, we append our default bucket.
  if ($uri == 's3://') {
    $uri = 's3://' . $this->config
      ->getBucket();
  }
  $this->uri = S3Url::factory($uri);
}