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 the command factory on a client.

@codeCoverageIgnore

Parameters

\Aws\S3\S3Client $client: The client to override.

1 call to S3Client::setCommandFactory()
S3Client::factory in src/S3Client.php
Create a new S3Client using aws_key / aws_secret $conf variables.
1 method overrides S3Client::setCommandFactory()
S3Client::setCommandFactory in tests/Stub/S3Client.php
Override setCommandFactory to use our stub.

File

src/S3Client.php, line 139
A wrapper around S3Client::factory() using aws_key / aws_secret variables.

Class

S3Client
A wrapper around S3Client::factory() using aws_key / aws_secret variables.

Namespace

Drupal\amazons3

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);
}