config-functions.php 322 B

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