class PresignedPath in AmazonS3 7.2
@class PresignedPath @package Drupal\amazons3
Hierarchy
- class \Drupal\amazons3\Matchable\BasicPath implements Matchable uses MatchableRegex
- class \Drupal\amazons3\Matchable\PresignedPath
Expanded class hierarchy of PresignedPath
4 files declare their use of PresignedPath
- PresignedPathTest.php in tests/
Matchable/ PresignedPathTest.php - StreamWrapper.php in src/
StreamWrapper.php - Drupal stream wrapper implementation for Amazon S3
- StreamWrapperConfiguration.php in src/
StreamWrapperConfiguration.php - StreamWrapperTest.php in tests/
StreamWrapperTest.php
File
- src/
Matchable/ PresignedPath.php, line 9
Namespace
Drupal\amazons3\MatchableView source
class PresignedPath extends BasicPath {
/**
* The timeout for URLs generated from this presigned path.
*
* @var int
*/
protected $timeout;
/**
* Create an array of PresignedPaths.
*
* @param array $patterns
* An array of patterns. Each key is a regular expression, and each value is
* an integer of the presigned timeout in seconds.
*
* @return PresignedPath[]
*/
public static function factory(array $patterns) {
$presignedPaths = array();
foreach ($patterns as $pattern => $timeout) {
$presignedPaths[] = new static($pattern, $timeout);
}
return $presignedPaths;
}
/**
* @param string $pattern
* @param int $timeout
*/
public function __construct($pattern, $timeout) {
$this->pattern = $pattern;
$this->timeout = $timeout;
}
/**
* @return string
*/
public function getPath() {
return $this->pattern;
}
/**
* @return int
*/
public function getTimeout() {
return $this->timeout;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BasicPath:: |
protected | property | The path pattern for this presigned path configuration. | |
BasicPath:: |
function |
Overrides MatchableRegex:: |
||
MatchableRegex:: |
public | function | ||
PresignedPath:: |
protected | property | The timeout for URLs generated from this presigned path. | |
PresignedPath:: |
public static | function |
Create an array of PresignedPaths. Overrides BasicPath:: |
|
PresignedPath:: |
public | function |
Overrides BasicPath:: |
|
PresignedPath:: |
public | function | ||
PresignedPath:: |
public | function |
Overrides BasicPath:: |