Documentation

RestClient
in package

MercadoPago cURL RestClient

Table of Contents

$customParams  : mixed
$defaultParams  : array<string|int, mixed>
$httpRequest  : CurlRequest|null
$verbArray  : mixed
__construct()  : mixed
RestClient constructor.
delete()  : array<string|int, mixed>
get()  : array<string|int, mixed>
getHttpRequest()  : CurlRequest|null
post()  : array<string|int, mixed>
put()  : array<string|int, mixed>
setHttpParam()  : mixed
setHttpRequest()  : mixed
exec()  : array<string|int, mixed>
getArrayValue()  : bool
setData()  : mixed
setHeaders()  : mixed

Properties

$customParams

protected mixed $customParams = []

$defaultParams

protected static array<string|int, mixed> $defaultParams = []

$verbArray

protected static mixed $verbArray = ['get' => 'GET', 'post' => 'POST', 'put' => 'PUT', 'delete' => 'DELETE']

Methods

__construct()

RestClient constructor.

public __construct() : mixed
Return values
mixed

delete()

public delete( $uri[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$uri :
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return values
array<string|int, mixed>

get()

public get( $uri[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$uri :
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return values
array<string|int, mixed>

post()

public post( $uri[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$uri :
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return values
array<string|int, mixed>

put()

public put( $uri[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$uri :
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return values
array<string|int, mixed>

setHttpParam()

public setHttpParam( $param,  $value) : mixed
Parameters
$param :
$value :
Return values
mixed

setHttpRequest()

public setHttpRequest( $request) : mixed
Parameters
$request :
Return values
mixed

exec()

protected exec( $options) : array<string|int, mixed>
Parameters
$options :
Tags
throws
Exception
Return values
array<string|int, mixed>

getArrayValue()

protected getArrayValue( $array,  $key) : bool
Parameters
$array :
$key :
Return values
bool

setData()

protected setData(HttpRequest $connect,  $data[, string $content_type = '' ]) : mixed
Parameters
$connect : HttpRequest
$data :
$content_type : string = ''
Tags
throws
Exception
Return values
mixed

setHeaders()

protected setHeaders(HttpRequest $connect, mixed $customHeaders) : mixed
Parameters
$connect : HttpRequest
$customHeaders : mixed
Return values
mixed

Search results