class ProvisioningConfiguration

Class ProvisioningConfiguration

Properties

ProvisioningAccountConfig $provisioningAccount
ApiConfig $api
LoggingConfig $logging

Methods

__construct(ProvisioningConfiguration|string|array|null $config = null)

ConfigurationAccount constructor.

init(ProvisioningConfiguration|string|array|null $config = null)

ConfigurationAccount initializer

importAccountUrl(string|UriInterface $accountUrl)

Imports configuration from a account URL.

importJson($json)

This is the actual constructor.

importConfig(ProvisioningConfiguration $otherConfig)

Imports configuration from another instance of the ConfigurationAccount.

jsonSerialize(bool $includeSensitive = true, bool $includeEmptyKeys = false, bool $includeEmptySections = false)

Serializes ConfigurationAccount to a json array.

instance(ProvisioningConfiguration|string|array|null $config = null)

Singleton instance for effective access to global configuration

Details

__construct(ProvisioningConfiguration|string|array|null $config = null)

ConfigurationAccount constructor.

Parameters

Name Type Description
$config ProvisioningConfiguration|string|array|null

init(ProvisioningConfiguration|string|array|null $config = null)

ConfigurationAccount initializer

Parameters

Name Type Description
$config ProvisioningConfiguration|string|array|null

ProvisioningConfiguration importAccountUrl(string|UriInterface $accountUrl)

Imports configuration from a account URL.

Parameters

Name Type Description
$accountUrl string|UriInterface The account URL.

Return Value

ProvisioningConfiguration

ProvisioningConfiguration importJson($json)

This is the actual constructor.

Parameters

Name Type Description
$json

Return Value

ProvisioningConfiguration

ProvisioningConfiguration importConfig(ProvisioningConfiguration $otherConfig)

Imports configuration from another instance of the ConfigurationAccount.

Parameters

Name Type Description
$otherConfig ProvisioningConfiguration The source of the configuration.

Return Value

ProvisioningConfiguration

mixed jsonSerialize(bool $includeSensitive = true, bool $includeEmptyKeys = false, bool $includeEmptySections = false)

Serializes ConfigurationAccount to a json array.

Parameters

Name Type Description
$includeSensitive bool Whether to include sensitive keys during serialization.
$includeEmptyKeys bool Whether to include keys without values.
$includeEmptySections bool Whether to include sections without keys with non-empty values.

Return Value

mixed data which can be serialized by json_encode.

static ProvisioningConfiguration instance(ProvisioningConfiguration|string|array|null $config = null)

Singleton instance for effective access to global configuration

Instance can be optionally initialized with the provided $config (used only on the first call)

Parameters

Name Type Description
$config ProvisioningConfiguration|string|array|null

Return Value

ProvisioningConfiguration

Constants

CLOUDINARY_ACCOUNT_URL_ENV_VAR