class PrivateS3fsStream in S3 File System 8.3
Same name and namespace in other branches
- 8.2 src/StreamWrapper/PrivateS3fsStream.php \Drupal\s3fs\StreamWrapper\PrivateS3fsStream
- 4.0.x src/StreamWrapper/PrivateS3fsStream.php \Drupal\s3fs\StreamWrapper\PrivateS3fsStream
Defines a Drupal s3fs stream wrapper class for use with private scheme.
Provides support for storing files on the amazon s3 file system with the Drupal file interface.
Hierarchy
- class \Drupal\s3fs\StreamWrapper\S3fsStream extends \Aws\S3\StreamWrapper implements StreamWrapperInterface uses StringTranslationTrait
- class \Drupal\s3fs\StreamWrapper\PrivateS3fsStream
Expanded class hierarchy of PrivateS3fsStream
File
- src/
StreamWrapper/ PrivateS3fsStream.php, line 13
Namespace
Drupal\s3fs\StreamWrapperView 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.');
}
/**
* {@inheritdoc}
*/
public function getExternalUrl() {
$s3_key = str_replace('\\', '/', $this->streamWrapperManager::getTarget($this->uri));
return Url::fromRoute('system.private_file_download', [
'filepath' => $s3_key,
], [
'absolute' => TRUE,
'path_processing' => FALSE,
])
->toString();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | Retrieve the underlying stream resource. | 1 |
PhpStreamWrapperInterface:: |
public | function | Closes stream. | 1 |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | Seeks to specific location in a stream. | 1 |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PrivateS3fsStream:: |
public | function |
Returns the description of the stream wrapper for use in the UI. Overrides S3fsStream:: |
|
PrivateS3fsStream:: |
public | function |
Returns a web accessible URL for the resource. Overrides S3fsStream:: |
|
PrivateS3fsStream:: |
public | function |
Returns the name of the stream wrapper for use in the UI. Overrides S3fsStream:: |
|
S3fsStream:: |
protected | property | Custom domain used to access files. | |
S3fsStream:: |
protected | property | Module configuration for stream. | |
S3fsStream:: |
protected | property | Directory listing used by the dir_* methods. | |
S3fsStream:: |
protected | property | Indicates the current error state in the wrapper. | |
S3fsStream:: |
protected static | property | Default map for determining file mime types. | |
S3fsStream:: |
private | property | Mode in which the stream was opened. | |
S3fsStream:: |
private | property | Hash of opened stream parameters. | |
S3fsStream:: |
protected | property | Files which should be created with URLs that eventually time out. | |
S3fsStream:: |
private | property | The opened protocol (e.g., "s3"). | |
S3fsStream:: |
protected | property | The AWS SDK for PHP S3Client object. | |
S3fsStream:: |
protected | property | The S3fs Service. | |
S3fsStream:: |
protected | property | Files that the user has said must be downloaded, rather than viewed. | |
S3fsStream:: |
protected | property | The stream wrapper manager. | |
S3fsStream:: |
protected | property | Map for files that should be delivered with a torrent URL. | |
S3fsStream:: |
protected | property | All files included public files will be private if this feature is enable. | |
S3fsStream:: |
protected | property | Instance uri referenced as "<scheme>://key". | |
S3fsStream:: |
constant | |||
S3fsStream:: |
protected static | function | Helper function to safely append a GET argument to a given base URL. | |
S3fsStream:: |
protected | function | Converts a Drupal URI path into what is expected to be stored in S3. | |
S3fsStream:: |
protected | function | Delete an object's metadata from the cache. | |
S3fsStream:: |
public | function |
Gets the name of the parent directory of a given path. Overrides StreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
private | function | ||
S3fsStream:: |
protected | function | Return bucket and key for a command array. | |
S3fsStream:: |
public | function | Gets the path that the wrapper is responsible for. | |
S3fsStream:: |
private | function | Get the stream's context options or remove them if wanting default. | |
S3fsStream:: |
protected | function | Try to fetch an object from the metadata cache. | |
S3fsStream:: |
protected | function | Returns the converted metadata for an object in S3. | |
S3fsStream:: |
public static | function |
Returns the type of stream wrapper. Overrides StreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Returns the stream resource URI, which looks like "<scheme>://filepath". Overrides StreamWrapperInterface:: |
|
S3fsStream:: |
protected | function | Determine whether the $uri is a directory. | |
S3fsStream:: |
public | function |
Support for mkdir(). Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
protected | function | Fetch an object from the file metadata cache table. | |
S3fsStream:: |
public | function |
This wrapper does not support realpath(). Overrides StreamWrapperInterface:: |
|
S3fsStream:: |
public static | function | ||
S3fsStream:: |
public | function |
Support for rename(). Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Support for rmdir(). Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Sets the stream resource URI. URIs are formatted as "<scheme>://filepath". Overrides StreamWrapperInterface:: |
|
S3fsStream:: |
protected | function | Get the status of the file with the specified URI. | |
S3fsStream:: |
public | function |
Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Sets metadata on the stream. Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Change stream options. Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Truncate stream. Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
protected | function | Triggers one or more errors. | |
S3fsStream:: |
public | function |
Support for unlink(). Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function |
Overrides PhpStreamWrapperInterface:: |
|
S3fsStream:: |
public | function | Wait for the specified file to exist in the bucket. | |
S3fsStream:: |
protected | function | Write an object's (and its ancestor folders') metadata to the cache. | |
S3fsStream:: |
public | function | Write the file at the given URI into the metadata cache. | |
S3fsStream:: |
public | function | S3fsStream constructor. | |
StreamWrapperInterface:: |
constant | A filter that matches all wrappers. | ||
StreamWrapperInterface:: |
constant | Defines the stream wrapper bit flag for a hidden file. | ||
StreamWrapperInterface:: |
constant | Refers to a local file system location. | ||
StreamWrapperInterface:: |
constant | Hidden, readable and writable using local files. | ||
StreamWrapperInterface:: |
constant | Visible, readable and writable using local files. | ||
StreamWrapperInterface:: |
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:: |
constant | Wrapper is readable (almost always true). | ||
StreamWrapperInterface:: |
constant | Visible and read-only. | ||
StreamWrapperInterface:: |
constant | Exposed in the UI and potentially web accessible. | ||
StreamWrapperInterface:: |
constant | Wrapper is writable. | ||
StreamWrapperInterface:: |
constant | Visible, readable and writable. | ||
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |