config-functions.php 425 B

1234567891011121314151617181920
  1. <?php
  2. trait ConfigFunctions
  3. {
  4. public function getConfigItem($item)
  5. {
  6. if ($this->config[$item]) {
  7. $configItem = $this->config[$item];
  8. if ($item == 'organizrHash') {
  9. $configItem = '***Secure***';
  10. }
  11. $this->setAPIResponse('success', null, 200, $configItem);
  12. return $this->config[$item];
  13. } else {
  14. $this->setAPIResponse('error', $item . ' is not defined or is blank', 404);
  15. return false;
  16. }
  17. }
  18. }