Config
extends AbstractConfig
in package
Config Class Doc Comment
Table of Contents
- $cache : array<string|int, mixed>
- $data : array<string|int, mixed>|null
- $_restclient : mixed
- $_supportedFileParsers : array<string|int, mixed>
- Available parsers
- __construct() : mixed
- Config constructor.
- all() : array<string|int, mixed>|null
- clean() : mixed
- configure() : mixed
- get() : mixed|null
- getData() : mixed
- getToken() : mixed
- Obtain token with key and secret
- getUserId() : mixed
- has() : bool
- load() : static
- refreshToken() : mixed
- Refresh token
- set() : mixed
- Set config value
- getDefaults() : array<string|int, mixed>
- Default values
- _getParser() : null
Properties
$cache
protected
array<string|int, mixed>
$cache
= []
$data
protected
array<string|int, mixed>|null
$data
= null
$_restclient
private
mixed
$_restclient
= null
$_supportedFileParsers
Available parsers
private
array<string|int, mixed>
$_supportedFileParsers
= ['MercadoPago\Config\Json', 'MercadoPago\Config\Yaml']
Methods
__construct()
Config constructor.
public
__construct([null $path = null ][, null $restClient = null ]) : mixed
Parameters
- $path : null = null
- $restClient : null = null
Return values
mixed —all()
public
all() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —clean()
public
clean() : mixed
Return values
mixed —configure()
public
configure([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
Return values
mixed —get()
public
get( $key[, null $default = null ]) : mixed|null
Parameters
Return values
mixed|null —getData()
public
getData() : mixed
Return values
mixed —getToken()
Obtain token with key and secret
public
getToken() : mixed
Return values
mixed —getUserId()
public
getUserId() : mixed
Return values
mixed —has()
public
has( $key) : bool
Parameters
Return values
bool —load()
public
static load([null $path = null ]) : static
Parameters
- $path : null = null
-
Static load method
Return values
static —refreshToken()
Refresh token
public
refreshToken() : mixed
Return values
mixed —//TODO check valid response with production credentials
set()
Set config value
public
set( $key, $value) : mixed
Parameters
Return values
mixed —getDefaults()
Default values
protected
getDefaults() : array<string|int, mixed>
Return values
array<string|int, mixed> —_getParser()
private
_getParser( $extension) : null