SDK for PHP 3.x

AbstractConfigurationProvider
in package

AbstractYes

A configuration provider is a function that returns a promise that is fulfilled with a configuration object. This class provides base functionality usable by specific configuration provider implementations

Table of Contents

Constants

ENV_CONFIG_FILE  = 'AWS_CONFIG_FILE'
ENV_PROFILE  = 'AWS_PROFILE'

Properties

$cacheKey  : mixed

Methods

cache()  : callable
Wraps a config provider and saves provided configuration in an instance of Aws\CacheInterface. Forwards calls when no config found in cache and updates cache with the results.
chain()  : callable
Creates an aggregate configuration provider that invokes the provided variadic providers one after the other until a provider returns configuration.
memoize()  : callable
Wraps a config provider and caches previously provided configuration.

Constants

ENV_CONFIG_FILE

public mixed ENV_CONFIG_FILE = 'AWS_CONFIG_FILE'

ENV_PROFILE

public mixed ENV_PROFILE = 'AWS_PROFILE'

Properties

$cacheKey

public static mixed $cacheKey

Methods

cache()

Wraps a config provider and saves provided configuration in an instance of Aws\CacheInterface. Forwards calls when no config found in cache and updates cache with the results.

public static cache(callable $provider, CacheInterface $cache[, string|null $cacheKey = null ]) : callable
Parameters
$provider : callable

Configuration provider function to wrap

$cache : CacheInterface

Cache to store configuration

$cacheKey : string|null = null

(optional) Cache key to use

Return values
callable

chain()

Creates an aggregate configuration provider that invokes the provided variadic providers one after the other until a provider returns configuration.

public static chain() : callable
Return values
callable

memoize()

Wraps a config provider and caches previously provided configuration.

public static memoize(callable $provider) : callable
Parameters
$provider : callable

Config provider function to wrap.

Return values
callable
On this page