You are here

public static function CompositeFactory::getDefaultChain in AmazonS3 7.2

Get the default chain to use with clients

@codeCoverageIgnore This is now fixed upstream to use static.

Parameters

ClientInterface $client Client to base the chain on:

Return value

self

1 call to CompositeFactory::getDefaultChain()
S3Client::setCommandFactory in src/S3Client.php
Override the command factory on a client.

File

src/CompositeFactory.php, line 38

Class

CompositeFactory
Override CompositeFactory to inject hook calls.

Namespace

Drupal\amazons3

Code

public static function getDefaultChain(ClientInterface $client) {
  $factories = array();
  if ($description = $client
    ->getDescription()) {
    $factories[] = new ServiceDescriptionFactory($description);
  }
  $factories[] = new ConcreteClassFactory($client);
  return new static($factories);
}