You are here

private function S3fsStream::getOptions 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::getOptions()

Get the stream's context options or remove them if wanting default.

Parameters

bool $removeContextData: Whether to remove the stream's context information.

Return value

array An array of options.

4 calls to S3fsStream::getOptions()
S3fsStream::getCommandParams in src/StreamWrapper/S3fsStream.php
Return bucket and key for a command array.
S3fsStream::rename in src/StreamWrapper/S3fsStream.php
Support for rename().
S3fsStream::stream_flush in src/StreamWrapper/S3fsStream.php
S3fsStream::stream_open in src/StreamWrapper/S3fsStream.php

File

src/StreamWrapper/S3fsStream.php, line 1487

Class

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

Namespace

Drupal\s3fs\StreamWrapper

Code

private function getOptions($removeContextData = FALSE) {

  // Context is not set when doing things like stat.
  if (is_null($this->context)) {
    $this->context = stream_context_get_default();
  }
  $options = stream_context_get_options($this->context);
  if ($removeContextData) {
    unset($options['client'], $options['seekable'], $options['cache']);
  }
  return $options;
}