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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<?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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<?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()); } |