Configuration
in package
Table of Contents
- $clientId : string
- The client ID used to authenticate the API calls.
- $clientSecret : string
- The client secret used to authenticate the API calls.
- $host : string
- The optional custom host domain to use for API calls.
- $httpClient : HTTPClient|null
- The http client to use. Defaults to BasicHTTPClient within the SDK.
- $logLevel : string
- The log level. Defaults to 'off'.
- $port : int
- The port to use. Defaults to 443 for an SSL connection, and 80 for a non SSL connection.
- $ssl : bool
- Whether to use SSL. Defaults to true
- $timeout : int
- The maximum number of seconds to allow cURL functions to execute. Defaults to 20.
- __construct() : mixed
- getClientId() : string
- getClientSecret() : string
- getHost() : string
- getHttpClient() : HTTPClient
- getLogLevel() : string
- getPort() : int
- getTimeout() : int
- isSsl() : bool
- setHost() : Configuration
- setHttpClient() : Configuration
- setLogLevel() : Configuration
- Set the log level for debugging.
- setPort() : Configuration
- setProductionEnvironment() : Configuration
- Build for production environment
- setSsl() : Configuration
- setTimeout() : Configuration
- Set the maximum number of seconds to allow cURL functions to execute. Defaults to 20.
Properties
$clientId
The client ID used to authenticate the API calls.
private
string
$clientId
$clientSecret
The client secret used to authenticate the API calls.
private
string
$clientSecret
$host
The optional custom host domain to use for API calls.
private
string
$host
= "test.api.amadeus.com"
Defaults to "test.api.amadeus.com" for a test environment, and "api.amadeus.com" for a production environment.
$httpClient
The http client to use. Defaults to BasicHTTPClient within the SDK.
private
HTTPClient|null
$httpClient
= null
$logLevel
The log level. Defaults to 'off'.
private
string
$logLevel
= "off"
$port
The port to use. Defaults to 443 for an SSL connection, and 80 for a non SSL connection.
private
int
$port
= 443
$ssl
Whether to use SSL. Defaults to true
private
bool
$ssl
= true
$timeout
The maximum number of seconds to allow cURL functions to execute. Defaults to 20.
private
int
$timeout
= 20
Methods
__construct()
public
__construct(string $clientId, string $clientSecret) : mixed
Parameters
- $clientId : string
- $clientSecret : string
Return values
mixed —getClientId()
public
getClientId() : string
Return values
string —getClientSecret()
public
getClientSecret() : string
Return values
string —getHost()
public
getHost() : string
Return values
string —getHttpClient()
public
getHttpClient() : HTTPClient
Return values
HTTPClient —getLogLevel()
public
getLogLevel() : string
Return values
string —getPort()
public
getPort() : int
Return values
int —getTimeout()
public
getTimeout() : int
Return values
int —isSsl()
public
isSsl() : bool
Return values
bool —setHost()
public
setHost(string $host) : Configuration
Parameters
- $host : string
Return values
Configuration —setHttpClient()
public
setHttpClient(HTTPClient $httpClient) : Configuration
Parameters
- $httpClient : HTTPClient
Return values
Configuration —setLogLevel()
Set the log level for debugging.
public
setLogLevel(string $logLevel) : Configuration
eg.
setLogLevel("debug");
Parameters
- $logLevel : string
Return values
Configuration —setPort()
public
setPort(int $port) : Configuration
Parameters
- $port : int
Return values
Configuration —setProductionEnvironment()
Build for production environment
public
setProductionEnvironment() : Configuration
Return values
Configuration —setSsl()
public
setSsl(bool $ssl) : Configuration
Parameters
- $ssl : bool
Return values
Configuration —setTimeout()
Set the maximum number of seconds to allow cURL functions to execute. Defaults to 20.
public
setTimeout(int $timeout) : Configuration
Parameters
- $timeout : int