You are here

protected function S3fsStream::getCommandParams in S3 File System 8.3

Same name and namespace in other branches
  1. 4.0.x src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::getCommandParams()

Return bucket and key for a command array.

Parameters

string $uri: Uri to the required object.

Return value

array A modified path to the key in S3.

3 calls to S3fsStream::getCommandParams()
S3fsStream::getS3Metadata in src/StreamWrapper/S3fsStream.php
Returns the converted metadata for an object in S3.
S3fsStream::stream_flush in src/StreamWrapper/S3fsStream.php
S3fsStream::waitUntilFileExists in src/StreamWrapper/S3fsStream.php
Wait for the specified file to exist in the bucket.

File

src/StreamWrapper/S3fsStream.php, line 1557

Class

S3fsStream
Defines a Drupal s3 (s3://) stream wrapper class.

Namespace

Drupal\s3fs\StreamWrapper

Code

protected function getCommandParams($uri) {
  $convertedPath = $this
    ->convertUriToKeyedPath($uri, FALSE);
  $params = $this
    ->getOptions(TRUE);
  $params['Bucket'] = $this->config['bucket'];
  $params['Key'] = $this->streamWrapperManager::getTarget($convertedPath);

  // Allow other modules to change the command param settings.
  \Drupal::moduleHandler()
    ->alter('s3fs_command_params', $params);
  return $params;
}