LINE Messaging API SDK for PHP

Configuration
in package

Configuration Class Doc Comment PHP version 7.4

Tags
category

Class

author

OpenAPI Generator team

link
https://openapi-generator.tech

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_STRING

public mixed BOOLEAN_FORMAT_STRING = 'string'

Properties

$accessToken

Access token for OAuth/Bearer authentication

protected string $accessToken = ''

$apiKeyPrefixes

Associate array to store API prefix (e.g. Bearer)

protected array<string|int, string> $apiKeyPrefixes = []

$apiKeys

Associate array to store API key(s)

protected array<string|int, string> $apiKeys = []

$booleanFormatForQueryString

Boolean format for query string

protected string $booleanFormatForQueryString = self::BOOLEAN_FORMAT_INT

$debug

Debug switch (default set to false)

protected bool $debug = false

$debugFile

Debug file location (log to STDOUT by default)

protected string $debugFile = 'php://output'

$host

The host

protected string $host = 'https://api.line.me'

$password

Password for HTTP basic authentication

protected string $password = ''

$tempFolderPath

Debug file location (log to STDOUT by default)

protected string $tempFolderPath

$userAgent

User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default

protected string $userAgent = 'LINE-BotSDK-PHP/8'

$username

Username for HTTP basic authentication

protected string $username = ''

Methods

__construct()

Constructor

public __construct() : mixed
Return values
mixed

getAccessToken()

Gets the access token for OAuth

public getAccessToken() : string
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)

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)

Return values
null|string

getApiKeyWithPrefix()

Get API key (with prefix if set)

public getApiKeyWithPrefix(string $apiKeyIdentifier) : null|string
Parameters
$apiKeyIdentifier : string

name of apikey

Return values
null|string

API key with the prefix

getBooleanFormatForQueryString()

Gets boolean format for query string.

public getBooleanFormatForQueryString() : string
Return values
string

Boolean format for query string

getDebug()

Gets the debug flag

public getDebug() : bool
Return values
bool

getDebugFile()

Gets the debug file

public getDebugFile() : string
Return values
string

getHost()

Gets the host

public getHost() : string
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)

Return values
string

URL based on host settings

getHostSettings()

Returns an array of host settings

public getHostSettings() : array<string|int, mixed>
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)

Return values
string

URL based on host settings

getPassword()

Gets the password for HTTP basic authentication

public getPassword() : string
Return values
string

Password for HTTP basic authentication

getTempFolderPath()

Gets the temp folder path

public getTempFolderPath() : string
Return values
string

Temp folder path

getUserAgent()

Gets the user agent of the api client

public getUserAgent() : string
Return values
string

user agent

getUsername()

Gets the username for HTTP basic authentication

public getUsername() : string
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

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

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

Return values
$this

setBooleanFormatForQueryString()

Sets boolean format for query string.

public setBooleanFormatForQueryString(string $booleanFormat) : $this
Parameters
$booleanFormat : string
Return values
$this

setDebug()

Sets debug flag

public setDebug(bool $debug) : $this
Parameters
$debug : bool

Debug flag

Return values
$this

setDebugFile()

Sets the debug file

public setDebugFile(string $debugFile) : $this
Parameters
$debugFile : string

Debug file

Return values
$this

setDefaultConfiguration()

Sets the default configuration instance

public static setDefaultConfiguration(Configuration $config) : void
Parameters
$config : Configuration

An instance of the Configuration Object

Return values
void

setHost()

Sets the host

public setHost(string $host) : $this
Parameters
$host : string

Host

Return values
$this

setPassword()

Sets the password for HTTP basic authentication

public setPassword(string $password) : $this
Parameters
$password : string

Password for HTTP basic authentication

Return values
$this

setTempFolderPath()

Sets the temp folder path

public setTempFolderPath(string $tempFolderPath) : $this
Parameters
$tempFolderPath : string

Temp folder path

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
throws
InvalidArgumentException
Return values
$this

setUsername()

Sets the username for HTTP basic authentication

public setUsername(string $username) : $this
Parameters
$username : string

Username for HTTP basic authentication

Return values
$this

toDebugReport()

Gets the essential information for debugging

public static toDebugReport() : string
Return values
string

The report for debugging

Search results