class S3Client in AmazonS3 7.2
Same name in this branch
- 7.2 src/S3Client.php \Drupal\amazons3\S3Client
- 7.2 tests/Stub/S3Client.php \Drupal\amazons3Test\Stub\S3Client
Stub bootstrap functions.
@class S3Client @package Drupal\amazons3Test\Stub @codeCoverageIgnore
Hierarchy
- class \Drupal\amazons3\S3Client uses \DrupalAdapter\Bootstrap
Expanded class hierarchy of S3Client
2 files declare their use of S3Client
- S3ClientTest.php in tests/
S3ClientTest.php - StreamWrapperTest.php in tests/
StreamWrapperTest.php
File
- tests/
Stub/ S3Client.php, line 16
Namespace
Drupal\amazons3Test\StubView source
class S3Client extends \Drupal\amazons3\S3Client {
use Bootstrap;
protected static $factoryCalled = FALSE;
public static function resetCalled() {
static::$factoryCalled = FALSE;
}
/**
* @return boolean
*/
public static function isFactoryCalled() {
return static::$factoryCalled;
}
/**
* Override setCommandFactory to use our stub.
*
* @param \Aws\S3\S3Client $client
*/
protected static function setCommandFactory($client) {
$default = CompositeFactory::getDefaultChain($client);
$default
->add(new AliasFactory($client, static::$commandAliases), 'Guzzle\\Service\\Command\\Factory\\ServiceDescriptionFactory');
$client
->setCommandFactory($default);
}
/**
* {@inheritdoc}
*/
public static function factory($config = array(), $bucket = NULL) {
static::$factoryCalled = TRUE;
return parent::factory($config, $bucket);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Bootstrap:: |
protected static | property | ||
Bootstrap:: |
public static | function | ||
Bootstrap:: |
public static | function | Static version of variable_get() for testing. | |
S3Client:: |
protected static | property | This set of commandAliases is a protected static with no getter on the S3Client class. | |
S3Client:: |
protected static | property | ||
S3Client:: |
public static | function |
Create a new S3Client using aws_key / aws_secret $conf variables. Overrides S3Client:: |
|
S3Client:: |
public static | function | Get the region for an S3Client for a specific bucket. | |
S3Client:: |
public static | function | ||
S3Client:: |
public static | function | ||
S3Client:: |
protected static | function |
Override setCommandFactory to use our stub. Overrides S3Client:: |
|
S3Client:: |
public static | function | Validate that a bucket exists. |