Configuration
class Configuration
Configuration Class Doc Comment PHP version 7.4
Constants
BOOLEAN_FORMAT_INT |
|
BOOLEAN_FORMAT_STRING |
|
Properties
protected string[] | $apiKeys | Associate array to store API key(s) |
|
protected string[] | $apiKeyPrefixes | Associate array to store API prefix (e.g. Bearer) |
|
protected string | $accessToken | Access token for OAuth/Bearer authentication |
|
protected string | $booleanFormatForQueryString | Boolean format for query string |
|
protected string | $username | Username for HTTP basic authentication |
|
protected string | $password | Password for HTTP basic authentication |
|
protected string | $host | The host |
|
protected string | $userAgent | User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default |
|
protected bool | $debug | Debug switch (default set to false) |
|
protected string | $debugFile | Debug file location (log to STDOUT by default) |
|
protected string | $tempFolderPath | Debug file location (log to STDOUT by default) |
Methods
Constructor
Sets API key
Gets API key
Sets the prefix for API key (e.g. Bearer)
Gets API key prefix
Sets the access token for OAuth
Gets the access token for OAuth
Sets boolean format for query string.
Gets boolean format for query string.
Sets the username for HTTP basic authentication
Gets the username for HTTP basic authentication
Sets the password for HTTP basic authentication
Gets the password for HTTP basic authentication
Sets the host
Gets the host
Sets the user agent of the api client
Gets the user agent of the api client
Sets debug flag
Gets the debug flag
Sets the debug file
Gets the debug file
Sets the temp folder path
Gets the temp folder path
Gets the default configuration instance
Gets the essential information for debugging
Get API key (with prefix if set)
Returns an array of host settings
Returns URL based on host settings, index and variables
Returns URL based on the index and variables
Details
at line 129
__construct()
Constructor
at line 142
$this
setApiKey(string $apiKeyIdentifier, string $key)
Sets API key
at line 155
null|string
getApiKey(string $apiKeyIdentifier)
Gets API key
at line 168
$this
setApiKeyPrefix(string $apiKeyIdentifier, string $prefix)
Sets the prefix for API key (e.g. Bearer)
at line 181
null|string
getApiKeyPrefix(string $apiKeyIdentifier)
Gets API key prefix
at line 193
$this
setAccessToken(string $accessToken)
Sets the access token for OAuth
at line 204
string
getAccessToken()
Gets the access token for OAuth
at line 216
$this
setBooleanFormatForQueryString(string $booleanFormat)
Sets boolean format for query string.
at line 228
string
getBooleanFormatForQueryString()
Gets boolean format for query string.
at line 240
$this
setUsername(string $username)
Sets the username for HTTP basic authentication
at line 251
string
getUsername()
Gets the username for HTTP basic authentication
at line 263
$this
setPassword(string $password)
Sets the password for HTTP basic authentication
at line 274
string
getPassword()
Gets the password for HTTP basic authentication
at line 286
$this
setHost(string $host)
Sets the host
at line 297
string
getHost()
Gets the host
at line 310
$this
setUserAgent(string $userAgent)
Sets the user agent of the api client
at line 325
string
getUserAgent()
Gets the user agent of the api client
at line 337
$this
setDebug(bool $debug)
Sets debug flag
at line 348
bool
getDebug()
Gets the debug flag
at line 360
$this
setDebugFile(string $debugFile)
Sets the debug file
at line 371
string
getDebugFile()
Gets the debug file
at line 383
$this
setTempFolderPath(string $tempFolderPath)
Sets the temp folder path
at line 394
string
getTempFolderPath()
Gets the temp folder path
at line 404
static Configuration
getDefaultConfiguration()
Gets the default configuration instance
at line 420
static void
setDefaultConfiguration(Configuration $config)
Sets the default configuration instance
at line 430
static string
toDebugReport()
Gets the essential information for debugging
at line 448
null|string
getApiKeyWithPrefix(string $apiKeyIdentifier)
Get API key (with prefix if set)
at line 471
array
getHostSettings()
Returns an array of host settings
at line 489
static string
getHostString(array $hostsSettings, int $hostIndex, array $variables = null)
Returns URL based on host settings, index and variables
at line 527
string
getHostFromSettings(int $index, array|null $variables = null)
Returns URL based on the index and variables