You are here

class PrivateS3fsStream in S3 File System 8.2

Same name and namespace in other branches
  1. 8.3 src/StreamWrapper/PrivateS3fsStream.php \Drupal\s3fs\StreamWrapper\PrivateS3fsStream
  2. 4.0.x src/StreamWrapper/PrivateS3fsStream.php \Drupal\s3fs\StreamWrapper\PrivateS3fsStream

Defines a Drupal s3fs stream wrapper class for use with private scheme (private://).

Provides support for storing files on the amazon s3 file system with the Drupal file interface.

Hierarchy

Expanded class hierarchy of PrivateS3fsStream

File

src/StreamWrapper/PrivateS3fsStream.php, line 12

Namespace

Drupal\s3fs\StreamWrapper
View source
class PrivateS3fsStream extends S3fsStream {

  /**
   * {@inheritdoc}
   */
  public function getName() {
    return $this
      ->t('Private files (s3fs)');
  }

  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return $this
      ->t('Private files served from Amazon S3.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PrivateS3fsStream::getDescription public function Returns the description of the stream wrapper for use in the UI. Overrides S3fsStream::getDescription
PrivateS3fsStream::getName public function Returns the name of the stream wrapper for use in the UI. Overrides S3fsStream::getName
S3fsStream::$body private property Underlying stream resource.
S3fsStream::$constructed protected property The constructor sets this to TRUE once it's finished.
S3fsStream::$dir protected property Directory listing used by the dir_* methods.
S3fsStream::$domain protected property Domain we use to access files over http.
S3fsStream::$handle public property A generic resource handle.
S3fsStream::$mimeTypeMapping protected static property Default map for determining file mime types.
S3fsStream::$presignedURLs protected property Files which should be created with URLs that eventually time out.
S3fsStream::$s3 protected property The AWS SDK for PHP S3Client object.
S3fsStream::$saveas protected property Files that the user has said must be downloaded, rather than viewed.
S3fsStream::$torrents protected property Map for files that should be delivered with a torrent URL.
S3fsStream::$uri protected property Instance URI (stream).
S3fsStream::$_error_state protected property Indicates the current error state in the wrapper.
S3fsStream::convertMetadata protected function Convert file metadata returned from S3 into a metadata cache array.
S3fsStream::dirname public function Gets the name of the parent directory of a given path. Overrides StreamWrapperInterface::dirname
S3fsStream::dir_closedir public function Support for closedir(). Overrides PhpStreamWrapperInterface::dir_closedir
S3fsStream::dir_opendir public function Support for opendir(). Overrides PhpStreamWrapperInterface::dir_opendir
S3fsStream::dir_readdir public function Support for readdir(). Overrides PhpStreamWrapperInterface::dir_readdir
S3fsStream::dir_rewinddir public function Support for rewinddir(). Overrides PhpStreamWrapperInterface::dir_rewinddir
S3fsStream::getClient protected function
S3fsStream::getDirectoryPath public function Gets the path that the wrapper is responsible for.
S3fsStream::getExternalUrl public function Returns a web accessible URL for the resource. Overrides StreamWrapperInterface::getExternalUrl
S3fsStream::getTarget protected function
S3fsStream::getType public static function Returns the type of stream wrapper. Overrides StreamWrapperInterface::getType
S3fsStream::getUri public function Returns the stream resource URI, which looks like "<scheme>://filepath". Overrides StreamWrapperInterface::getUri
S3fsStream::mkdir public function Support for mkdir(). Overrides PhpStreamWrapperInterface::mkdir
S3fsStream::moveUploadedFile public function
S3fsStream::realpath public function This wrapper does not support realpath(). Overrides StreamWrapperInterface::realpath
S3fsStream::rename public function Support for rename(). Overrides PhpStreamWrapperInterface::rename
S3fsStream::rmdir public function Support for rmdir(). Overrides PhpStreamWrapperInterface::rmdir
S3fsStream::setUri public function Sets the stream resource URI. URIs are formatted as "<scheme>://filepath". Overrides StreamWrapperInterface::setUri
S3fsStream::stream_cast public function Cast the stream to return the underlying file resource Overrides PhpStreamWrapperInterface::stream_cast
S3fsStream::stream_close public function Support for fclose(). Overrides PhpStreamWrapperInterface::stream_close
S3fsStream::stream_eof public function Support for feof(). Overrides PhpStreamWrapperInterface::stream_eof
S3fsStream::stream_flush public function Support for fflush(). Flush current cached stream data to a file in S3. Overrides PhpStreamWrapperInterface::stream_flush
S3fsStream::stream_lock public function This wrapper does not support flock(). Overrides PhpStreamWrapperInterface::stream_lock
S3fsStream::stream_metadata public function Sets metadata on the stream. Overrides PhpStreamWrapperInterface::stream_metadata
S3fsStream::stream_open public function Support for fopen(), file_get_contents(), file_put_contents() etc. Overrides PhpStreamWrapperInterface::stream_open
S3fsStream::stream_read public function Support for fread(), file_get_contents() etc. Overrides PhpStreamWrapperInterface::stream_read
S3fsStream::stream_seek public function Support for fseek(). Overrides PhpStreamWrapperInterface::stream_seek
S3fsStream::stream_set_option public function Since Windows systems do not allow it and it is not needed for most use cases anyway, this method is not supported on local files and will trigger an error and return false. If needed, custom subclasses can provide OS-specific implementations for… Overrides PhpStreamWrapperInterface::stream_set_option
S3fsStream::stream_stat public function Support for fstat(). Overrides PhpStreamWrapperInterface::stream_stat
S3fsStream::stream_tell public function Support for ftell(). Overrides PhpStreamWrapperInterface::stream_tell
S3fsStream::stream_truncate public function Truncate stream. Overrides PhpStreamWrapperInterface::stream_truncate
S3fsStream::stream_write public function Support for fwrite(), file_put_contents() etc. Overrides PhpStreamWrapperInterface::stream_write
S3fsStream::unlink public function Support for unlink(). Overrides PhpStreamWrapperInterface::unlink
S3fsStream::url_stat public function Support for stat(). Overrides PhpStreamWrapperInterface::url_stat
S3fsStream::waitUntilFileExists public function Wait for the specified file to exist in the bucket.
S3fsStream::writeUriToCache public function Write the file at the given URI into the metadata cache.
S3fsStream::_append_get_arg protected static function Helper function to safely append a GET argument to a given base URL.
S3fsStream::_assert_constructor_called protected function Call the constructor it it hasn't been called yet.
S3fsStream::_debug protected static function Logging function used for debugging.
S3fsStream::_delete_cache protected function Delete an object's metadata from the cache.
S3fsStream::_get_metadata_from_s3 protected function Returns the converted metadata for an object in S3.
S3fsStream::_get_option protected function Get a specific stream context option.
S3fsStream::_get_options protected function Get the stream context options available to the current stream.
S3fsStream::_get_params protected function Get the Command parameters for the specified URI.
S3fsStream::_get_signed_request protected function Serialize and sign a command, returning a request object.
S3fsStream::_open_append_stream protected function Initialize the stream wrapper for an append stream.
S3fsStream::_open_read_stream protected function Initialize the stream wrapper for a read only stream.
S3fsStream::_open_write_stream protected function Initialize the stream wrapper for a write only stream.
S3fsStream::_read_cache protected function Fetch an object from the file metadata cache table.
S3fsStream::_s3fs_get_object protected function Try to fetch an object from the metadata cache.
S3fsStream::_stat protected function Get the status of the file with the specified URI.
S3fsStream::_trigger_error protected function Triggers one or more errors.
S3fsStream::_uri_is_dir protected function Determine whether the $uri is a directory.
S3fsStream::_write_cache protected function Write an object's (and its ancestor folders') metadata to the cache.
S3fsStream::__construct public function S3fsStream constructor.
StreamWrapperInterface::ALL constant A filter that matches all wrappers.
StreamWrapperInterface::HIDDEN constant Defines the stream wrapper bit flag for a hidden file.
StreamWrapperInterface::LOCAL constant Refers to a local file system location.
StreamWrapperInterface::LOCAL_HIDDEN constant Hidden, readable and writable using local files.
StreamWrapperInterface::LOCAL_NORMAL constant Visible, readable and writable using local files.
StreamWrapperInterface::NORMAL constant This is the default 'type' flag. This does not include StreamWrapperInterface::LOCAL, because PHP grants a greater trust level to local files (for example, they can be used in an "include" statement, regardless of the…
StreamWrapperInterface::READ constant Wrapper is readable (almost always true).
StreamWrapperInterface::READ_VISIBLE constant Visible and read-only.
StreamWrapperInterface::VISIBLE constant Exposed in the UI and potentially web accessible.
StreamWrapperInterface::WRITE constant Wrapper is writable.
StreamWrapperInterface::WRITE_VISIBLE constant Visible, readable and writable.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.