You are here

public function S3Url::setPath in AmazonS3 7.2

Set the path part of the URL.

Since we are using these URLs in a non-HTTP context, we don't replace spaces or question marks.

Parameters

array|string $path Path string or array of path segments:

Return value

Url

1 call to S3Url::setPath()
S3Url::setKey in src/S3Url.php
Set the S3 object key.

File

src/S3Url.php, line 82

Class

S3Url
Represents an s3:// stream URL.

Namespace

Drupal\amazons3

Code

public function setPath($path) {
  if (is_array($path)) {
    $path = '/' . implode('/', $path);
  }
  $this->path = $path;
  return $this;
}