\Drupal\strata\Storage StorageProviderFactoryInterface

Builds a storage provider a submodule contributes.

A provider is registered as a factory rather than as an instance because building one reads configuration and can fail: a missing bucket, credentials that do not resolve, an endpoint URL with no host. Deferring that until the provider is actually selected keeps a misconfigured optional provider from taking the container down at compile time.

Summary

Methods
Constants
id()
create()
No public constants found

Methods

id()

id() : string

The id the provider registers under, as it appears in configuration.

Returns

string —

A short lowercase token such as "s3" or "sftp".

create()

create() : \Drupal\strata\Storage\StorageProviderInterface

Builds the provider.

Throws

\RuntimeException

When the configuration does not describe a usable endpoint.

Returns

\Drupal\strata\Storage\StorageProviderInterface —

The provider.