Contents
- Introduction Introduction
- getConfiguration Retrieve all current configuration items
- updateConfiguration Update the value of one or more configuration items
Introduction
Retrieve and update the software configuration.
getConfiguration Retrieve all current configuration items
<?php
require_once('Mplusqapiclient.php');
$mplusqapiclient = new Mplusqapiclient();
// Initialize the client with your details.
// Then we call the getConfiguration() function wrapped in a try/catch block to intercept any exceptions.
try {
if (false !== ($configuration = $mplusqapiclient->getConfiguration())) {
var_dump($configuration);
exit('Retrieved configuration.');
} else {
exit('Unable to retrieve configuration.');
}
} catch (MplusQAPIException $e) {
exit($e->getMessage());
}
updateConfiguration Update the value of one or more configuration items
<?php
require_once('Mplusqapiclient.php');
$mplusqapiclient = new Mplusqapiclient(); // Initialize the client with your details.
$configuration = array(
'configurationList' => array(
'configuration' => array(
array(
'group' => 'pos',
'subgroup' => 'algemeen',
'key' => 'tonen_info_popup_bij_aanslaan',
'value' => '1',
),
),
),
);
// Then we call the updateConfiguration() function wrapped in a try/catch block to intercept any exceptions.
try {
if (false !== $mplusqapiclient->updateConfiguration($configuration)) {
exit('Updated configuration.');
} else {
exit('Unable to update configuration.');
}
} catch (MplusQAPIException $e) {
exit($e->getMessage());
}