class Catalog extends OperatorResource implements Catalog

Traits

Methods

populateFromArray (array $data) : mixed|void

No description

getServiceUrl (string $name, string $type, string $region, string $urlType) : false|string

Attempts to retrieve the base URL for a service from the catalog according to the arguments provided.

Details

populateFromArray(array $data)

Parameters

$data array

Return value

mixed|void

Example code

$response = $catalog->populateFromArray($data);

getServiceUrl(string $name, string $type, string $region, string $urlType)

Attempts to retrieve the base URL for a service from the catalog according to the arguments provided.

Parameters

$name string The name of the service as it appears in the catalog.
$type string The type of the service as it appears in the catalog.
$region string The region of the service as it appears in the catalog.
$urlType string Unused.

Return value

false|string FALSE if no URL found

Exceptions

RuntimeException If no endpoint is matched

Example code

$response = $catalog->getServiceUrl($name, $type, $region, $urlType);