HumHub Documentation (unofficial)

AbstractApi
in package

AbstractYes

Base class all API clients are inheriting.

Tags
author

Tobias Nyholm tobias.nyholm@gmail.com

author

Jérémy Derussé jeremy@derusse.com

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

Methods

presign()

public final presign(Input $input[, DateTimeImmutable|null $expires = null ]) : string
Parameters
$input : Input
$expires : DateTimeImmutable|null = null
Return values
string

getEndpoint()

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
string

getEndpointMetadata()

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[]}

getServiceCode()

protected getServiceCode() : string
Tags
deprecated
Return values
string

getSignatureScopeName()

protected getSignatureScopeName() : string
Tags
deprecated
Return values
string

getSignatureVersion()

protected getSignatureVersion() : string
Tags
deprecated
Return values
string

getSignerFactories()

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
string

getSigner()

private getSigner(string|null $region) : Signer
Parameters
$region : string|null

region provided by the user in the @region parameter of the Input

Return values
Signer

        
On this page

Search results