AbstractApi
in package
AbstractYes
Base class all API clients are inheriting.
Tags
Table of Contents
Properties
- $awsErrorFactory : AwsErrorFactoryInterface
- $configuration : Configuration
- $credentialProvider : CredentialProvider
- $endpointCache : EndpointCache
- $httpClient : HttpClientInterface
- $logger : LoggerInterface
- $signers : array<string, Signer>
Methods
- __construct() : mixed
- getConfiguration() : Configuration
- presign() : string
- discoverEndpoints() : array<string|int, EndpointInterface>
- getAwsErrorFactory() : AwsErrorFactoryInterface
- getEndpoint() : string
- Build the endpoint full uri.
- getEndpointMetadata() : array{endpoint: string, signRegion: string, signService: string, signVersions: string[]}
- Returns the AWS endpoint metadata for the given region.
- getResponse() : Response
- getServiceCode() : string
- getSignatureScopeName() : string
- getSignatureVersion() : string
- getSignerFactories() : array<string, callable(string, string): Signer>
- getDiscoveredEndpoint() : string
- getSigner() : Signer
Properties
$awsErrorFactory
private
AwsErrorFactoryInterface
$awsErrorFactory
$configuration
private
Configuration
$configuration
$credentialProvider
private
CredentialProvider
$credentialProvider
$endpointCache
private
EndpointCache
$endpointCache
$httpClient
private
HttpClientInterface
$httpClient
$logger
private
LoggerInterface
$logger
$signers
private
array<string, Signer>
$signers
Methods
__construct()
public
__construct([mixed $configuration = [] ][, CredentialProvider|null $credentialProvider = null ][, HttpClientInterface|null $httpClient = null ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $configuration : mixed = []
- $credentialProvider : CredentialProvider|null = null
- $httpClient : HttpClientInterface|null = null
- $logger : LoggerInterface|null = null
getConfiguration()
public
final getConfiguration() : Configuration
Return values
Configurationpresign()
public
final presign(Input $input[, DateTimeImmutable|null $expires = null ]) : string
Parameters
- $input : Input
- $expires : DateTimeImmutable|null = null
Return values
stringdiscoverEndpoints()
protected
discoverEndpoints(string|null $region) : array<string|int, EndpointInterface>
Parameters
- $region : string|null
Return values
array<string|int, EndpointInterface>getAwsErrorFactory()
protected
getAwsErrorFactory() : AwsErrorFactoryInterface
Return values
AwsErrorFactoryInterfacegetEndpoint()
Build the endpoint full uri.
protected
getEndpoint(string $uri, array<string, string> $query, string|null $region) : string
Parameters
- $uri : string
-
or path
- $query : array<string, string>
-
parameters that should go in the query string
- $region : string|null
-
region provided by the user in the
@region
parameter of the Input
Return values
stringgetEndpointMetadata()
Returns the AWS endpoint metadata for the given region.
protected
getEndpointMetadata(string|null $region) : array{endpoint: string, signRegion: string, signService: string, signVersions: string[]}
When user did not provide a region, the client have to either return a global endpoint or fallback to the Configuration::DEFAULT_REGION constant.
This implementation is a BC layer for client that does not require core:^1.2.
Parameters
- $region : string|null
-
region provided by the user (without fallback to a default region)
Return values
array{endpoint: string, signRegion: string, signService: string, signVersions: string[]}getResponse()
protected
final getResponse(Request $request[, RequestContext|null $context = null ]) : Response
Parameters
- $request : Request
- $context : RequestContext|null = null
Return values
ResponsegetServiceCode()
protected
getServiceCode() : string
Tags
Return values
stringgetSignatureScopeName()
protected
getSignatureScopeName() : string
Tags
Return values
stringgetSignatureVersion()
protected
getSignatureVersion() : string
Tags
Return values
stringgetSignerFactories()
protected
getSignerFactories() : array<string, callable(string, string): Signer>
Return values
array<string, callable(string, string): Signer>getDiscoveredEndpoint()
private
getDiscoveredEndpoint(string $uri, array<string, string> $query, string|null $region, bool $usesEndpointDiscovery, bool $requiresEndpointDiscovery) : string
Parameters
- $uri : string
- $query : array<string, string>
- $region : string|null
- $usesEndpointDiscovery : bool
- $requiresEndpointDiscovery : bool
Return values
stringgetSigner()
private
getSigner(string|null $region) : Signer
Parameters
- $region : string|null
-
region provided by the user in the
@region
parameter of the Input