Configuration
in package
Configuration Class Doc Comment PHP version 7.4
Tags
Table of Contents
- BOOLEAN_FORMAT_INT = 'int'
- BOOLEAN_FORMAT_STRING = 'string'
- $accessToken : string
- Access token for OAuth/Bearer authentication
- $apiKeyPrefixes : array<string|int, string>
- Associate array to store API prefix (e.g. Bearer)
- $apiKeys : array<string|int, string>
- Associate array to store API key(s)
- $booleanFormatForQueryString : string
- Boolean format for query string
- $debug : bool
- Debug switch (default set to false)
- $debugFile : string
- Debug file location (log to STDOUT by default)
- $host : string
- The host
- $password : string
- Password for HTTP basic authentication
- $tempFolderPath : string
- Debug file location (log to STDOUT by default)
- $userAgent : string
- User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default
- $username : string
- Username for HTTP basic authentication
- $defaultConfiguration : Configuration
- __construct() : mixed
- Constructor
- getAccessToken() : string
- Gets the access token for OAuth
- getApiKey() : null|string
- Gets API key
- getApiKeyPrefix() : null|string
- Gets API key prefix
- getApiKeyWithPrefix() : null|string
- Get API key (with prefix if set)
- getBooleanFormatForQueryString() : string
- Gets boolean format for query string.
- getDebug() : bool
- Gets the debug flag
- getDebugFile() : string
- Gets the debug file
- getDefaultConfiguration() : Configuration
- Gets the default configuration instance
- getHost() : string
- Gets the host
- getHostFromSettings() : string
- Returns URL based on the index and variables
- getHostSettings() : array<string|int, mixed>
- Returns an array of host settings
- getHostString() : string
- Returns URL based on host settings, index and variables
- getPassword() : string
- Gets the password for HTTP basic authentication
- getTempFolderPath() : string
- Gets the temp folder path
- getUserAgent() : string
- Gets the user agent of the api client
- getUsername() : string
- Gets the username for HTTP basic authentication
- setAccessToken() : $this
- Sets the access token for OAuth
- setApiKey() : $this
- Sets API key
- setApiKeyPrefix() : $this
- Sets the prefix for API key (e.g. Bearer)
- setBooleanFormatForQueryString() : $this
- Sets boolean format for query string.
- setDebug() : $this
- Sets debug flag
- setDebugFile() : $this
- Sets the debug file
- setDefaultConfiguration() : void
- Sets the default configuration instance
- setHost() : $this
- Sets the host
- setPassword() : $this
- Sets the password for HTTP basic authentication
- setTempFolderPath() : $this
- Sets the temp folder path
- setUserAgent() : $this
- Sets the user agent of the api client
- setUsername() : $this
- Sets the username for HTTP basic authentication
- toDebugReport() : string
- Gets the essential information for debugging
Constants
BOOLEAN_FORMAT_INT
public
mixed
BOOLEAN_FORMAT_INT
= 'int'
Tags
BOOLEAN_FORMAT_STRING
public
mixed
BOOLEAN_FORMAT_STRING
= 'string'
Tags
Properties
$accessToken
Access token for OAuth/Bearer authentication
protected
string
$accessToken
= ''
Tags
$apiKeyPrefixes
Associate array to store API prefix (e.g. Bearer)
protected
array<string|int, string>
$apiKeyPrefixes
= []
Tags
$apiKeys
Associate array to store API key(s)
protected
array<string|int, string>
$apiKeys
= []
Tags
$booleanFormatForQueryString
Boolean format for query string
protected
string
$booleanFormatForQueryString
= self::BOOLEAN_FORMAT_INT
Tags
$debug
Debug switch (default set to false)
protected
bool
$debug
= false
Tags
$debugFile
Debug file location (log to STDOUT by default)
protected
string
$debugFile
= 'php://output'
Tags
$host
The host
protected
string
$host
= 'http://petstore.swagger.io/v2'
Tags
$password
Password for HTTP basic authentication
protected
string
$password
= ''
Tags
$tempFolderPath
Debug file location (log to STDOUT by default)
protected
string
$tempFolderPath
Tags
$userAgent
User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default
protected
string
$userAgent
= 'OpenAPI-Generator/1.0.0/PHP'
Tags
$username
Username for HTTP basic authentication
protected
string
$username
= ''
Tags
$defaultConfiguration
private
static Configuration
$defaultConfiguration
Tags
Methods
__construct()
Constructor
public
__construct() : mixed
Tags
Return values
mixed —getAccessToken()
Gets the access token for OAuth
public
getAccessToken() : string
Tags
Return values
string —Access token for OAuth
getApiKey()
Gets API key
public
getApiKey(string $apiKeyIdentifier) : null|string
Parameters
- $apiKeyIdentifier : string
-
API key identifier (authentication scheme)
Tags
Return values
null|string —API key or token
getApiKeyPrefix()
Gets API key prefix
public
getApiKeyPrefix(string $apiKeyIdentifier) : null|string
Parameters
- $apiKeyIdentifier : string
-
API key identifier (authentication scheme)
Tags
Return values
null|string —getApiKeyWithPrefix()
Get API key (with prefix if set)
public
getApiKeyWithPrefix(string $apiKeyIdentifier) : null|string
Parameters
- $apiKeyIdentifier : string
-
name of apikey
Tags
Return values
null|string —API key with the prefix
getBooleanFormatForQueryString()
Gets boolean format for query string.
public
getBooleanFormatForQueryString() : string
Tags
Return values
string —Boolean format for query string
getDebug()
Gets the debug flag
public
getDebug() : bool
Tags
Return values
bool —getDebugFile()
Gets the debug file
public
getDebugFile() : string
Tags
Return values
string —getDefaultConfiguration()
Gets the default configuration instance
public
static getDefaultConfiguration() : Configuration
Tags
Return values
Configuration —getHost()
Gets the host
public
getHost() : string
Tags
Return values
string —Host
getHostFromSettings()
Returns URL based on the index and variables
public
getHostFromSettings(int $index[, array<string|int, mixed>|null $variables = null ]) : string
Parameters
- $index : int
-
index of the host settings
- $variables : array<string|int, mixed>|null = null
-
hash of variable and the corresponding value (optional)
Tags
Return values
string —URL based on host settings
getHostSettings()
Returns an array of host settings
public
getHostSettings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —an array of host settings
getHostString()
Returns URL based on host settings, index and variables
public
static getHostString(array<string|int, mixed> $hostsSettings, int $hostIndex[, array<string|int, mixed>|null $variables = null ]) : string
Parameters
- $hostsSettings : array<string|int, mixed>
- $hostIndex : int
-
index of the host settings
- $variables : array<string|int, mixed>|null = null
-
hash of variable and the corresponding value (optional)
Tags
Return values
string —URL based on host settings
getPassword()
Gets the password for HTTP basic authentication
public
getPassword() : string
Tags
Return values
string —Password for HTTP basic authentication
getTempFolderPath()
Gets the temp folder path
public
getTempFolderPath() : string
Tags
Return values
string —Temp folder path
getUserAgent()
Gets the user agent of the api client
public
getUserAgent() : string
Tags
Return values
string —user agent
getUsername()
Gets the username for HTTP basic authentication
public
getUsername() : string
Tags
Return values
string —Username for HTTP basic authentication
setAccessToken()
Sets the access token for OAuth
public
setAccessToken(string $accessToken) : $this
Parameters
- $accessToken : string
-
Token for OAuth
Tags
Return values
$this —setApiKey()
Sets API key
public
setApiKey(string $apiKeyIdentifier, string $key) : $this
Parameters
- $apiKeyIdentifier : string
-
API key identifier (authentication scheme)
- $key : string
-
API key or token
Tags
Return values
$this —setApiKeyPrefix()
Sets the prefix for API key (e.g. Bearer)
public
setApiKeyPrefix(string $apiKeyIdentifier, string $prefix) : $this
Parameters
- $apiKeyIdentifier : string
-
API key identifier (authentication scheme)
- $prefix : string
-
API key prefix, e.g. Bearer
Tags
Return values
$this —setBooleanFormatForQueryString()
Sets boolean format for query string.
public
setBooleanFormatForQueryString(string $booleanFormat) : $this
Parameters
- $booleanFormat : string
Tags
Return values
$this —setDebug()
Sets debug flag
public
setDebug(bool $debug) : $this
Parameters
- $debug : bool
-
Debug flag
Tags
Return values
$this —setDebugFile()
Sets the debug file
public
setDebugFile(string $debugFile) : $this
Parameters
- $debugFile : string
-
Debug file
Tags
Return values
$this —setDefaultConfiguration()
Sets the default configuration instance
public
static setDefaultConfiguration(Configuration $config) : void
Parameters
- $config : Configuration
-
An instance of the Configuration Object
Tags
Return values
void —setHost()
Sets the host
public
setHost(string $host) : $this
Parameters
- $host : string
-
Host
Tags
Return values
$this —setPassword()
Sets the password for HTTP basic authentication
public
setPassword(string $password) : $this
Parameters
- $password : string
-
Password for HTTP basic authentication
Tags
Return values
$this —setTempFolderPath()
Sets the temp folder path
public
setTempFolderPath(string $tempFolderPath) : $this
Parameters
- $tempFolderPath : string
-
Temp folder path
Tags
Return values
$this —setUserAgent()
Sets the user agent of the api client
public
setUserAgent(string $userAgent) : $this
Parameters
- $userAgent : string
-
the user agent of the api client
Tags
Return values
$this —setUsername()
Sets the username for HTTP basic authentication
public
setUsername(string $username) : $this
Parameters
- $username : string
-
Username for HTTP basic authentication
Tags
Return values
$this —toDebugReport()
Gets the essential information for debugging
public
static toDebugReport() : string
Tags
Return values
string —The report for debugging