You are here

protected static function S3Client::setCommandFactory in AmazonS3 7.2

Same name in this branch
  1. 7.2 src/S3Client.php \Drupal\amazons3\S3Client::setCommandFactory()
  2. 7.2 tests/Stub/S3Client.php \Drupal\amazons3Test\Stub\S3Client::setCommandFactory()

Override setCommandFactory to use our stub.

Parameters

\Aws\S3\S3Client $client:

Overrides S3Client::setCommandFactory

File

tests/Stub/S3Client.php, line 37

Class

S3Client
Stub bootstrap functions.

Namespace

Drupal\amazons3Test\Stub

Code

protected static function setCommandFactory($client) {
  $default = CompositeFactory::getDefaultChain($client);
  $default
    ->add(new AliasFactory($client, static::$commandAliases), 'Guzzle\\Service\\Command\\Factory\\ServiceDescriptionFactory');
  $client
    ->setCommandFactory($default);
}