AuthleteIniConfiguration implements AuthleteConfiguration Uses AuthleteConfigurationTrait
An implementation of the \Authlete\Conf\AuthleteConfiguration interface that refers to an ini file which parse_ini_file() can interpret.
This is a utility class to load a configuration file that includes configuration items related to Authlete. Below is the list of configuration items this utility class can interpret.
-
base_url
- The base URL of an Authlete server. The default value ishttps://api.authlete.com
. -
service_owner.api_key
- The API key of a service owner. -
service_owner.api_secret
- The API secret of a service owner. -
service.api_key
- The API key of a service. -
service.api_secret
- The API secret of a service.
Interfaces, Classes and Traits
- AuthleteConfiguration
- Configuration to access Authlete APIs.
Table of Contents
- __construct() : mixed
- Constructor.
- getBaseUrl() : string
- The base URL of an Authlete server.
- getServiceApiKey() : string
- Get the API key of a service.
- getServiceApiSecret() : string
- Get the API secret of a service.
- getServiceOwnerApiKey() : string
- Get the API key of a service owner.
- getServiceOwnerApiSecret() : string
- Get the API secret of a service owner.
Methods
__construct()
Constructor.
public
__construct([string $file = null ]) : mixed
This constructor tries to read a configuration file specified by
the $file
argument. If the argument is omitted or its value is
null
, this constructor refers to the environment variable,
AUTHLETE_CONFIGURATION_FILE
. If the environment variable is
defined and holds a non-empty value, the value of the environment
variable is regarded as the name of a configuration file.
Otherwise, authlete.ini
is used as the name of a configuration
file.
Parameters
- $file : string = null
-
The name of a configuration file. This parameter is optional and its default value is
null
.
Tags
Return values
mixed —getBaseUrl()
The base URL of an Authlete server.
public
getBaseUrl() : string
Return values
string —The base URL of an Authlete server.
getServiceApiKey()
Get the API key of a service.
public
getServiceApiKey() : string
Return values
string —The API key of a service.
getServiceApiSecret()
Get the API secret of a service.
public
getServiceApiSecret() : string
Return values
string —The API secret of a service.
getServiceOwnerApiKey()
Get the API key of a service owner.
public
getServiceOwnerApiKey() : string
Return values
string —The API key of a service owner.
getServiceOwnerApiSecret()
Get the API secret of a service owner.
public
getServiceOwnerApiSecret() : string
Return values
string —The API secret of a service owner.