Documentation

AuthleteApiException extends Exception

Exception that methods of the \Authlete\Api\AuthleteApi interface may throw.

Tags
link
\Authlete\Api\AuthleteApi

Table of Contents

__construct()  : mixed
Constructor.
getResponseBody()  : string
Get the HTTP response body of a response from an Authlete API.
getResponseHeaders()  : HttpHeaders
Get the HTTP headers of a response from an Authlete API.
getStatusCode()  : int
Get the HTTP status code of a response from an Authlete API.

Methods

__construct()

Constructor.

public __construct(string $message, int $statusCode[, HttpHeaders $responseHeaders = null ][, string $responseBody = null ]) : mixed
Parameters
$message : string

An error message. This argument is passed to the constructor of the parent class. This value is available through getMessage() method.

$statusCode : int

An HTTP status code. This argument is optional and its default value is 0. This value is available through getStatusCode() method.

$responseHeaders : HttpHeaders = null

HTTP response headers. This argument is optional and its default value is null. This value is available through getResponseHeaders() method. If null is given, however, getResponseHeader() will return an empty HttpHeaders instance.

$responseBody : string = null

An HTTP response body. This argument is optional and its default value is null. This value is available through getResponseBody() method.

Tags
throws
InvalidArgumentException

Types of arguments are invalid.

Return values
mixed

getResponseBody()

Get the HTTP response body of a response from an Authlete API.

public getResponseBody() : string
Return values
string

HTTP response body. This may be null.

getStatusCode()

Get the HTTP status code of a response from an Authlete API.

public getStatusCode() : int
Return values
int

HTTP status code. If this exception was thrown before an HTTP status code was read, this method returns 0.

Search results