reflexiondata.inc 816 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Get basic information about an installed PHP extension.
  4. *
  5. * @param ReflectionExtension $re
  6. * @return array
  7. */
  8. function sqlsrv_REData(ReflectionExtension $re) {
  9. $_data = [];
  10. $_data['getName'] = $re->getName() ?: NULL;
  11. $_data['getVersion'] = $re->getVersion() ?: NULL;
  12. $_data['getClassName'] = PHP_EOL.implode(", ",$re->getClassNames()) ?: NULL;
  13. foreach ($re->getConstants() as $key => $value) {
  14. $_data['getConstants'] .= "\n{$key}:={$value}";
  15. }
  16. $_data['getDependencies'] = $re->getDependencies() ?: NULL;
  17. $_data['getFunctions'] = PHP_EOL.implode(", ",array_keys($re->getFunctions())) ?: NULL;
  18. $_data['getINIEntries'] = $re->getINIEntries() ?: NULL;
  19. $_data['isPersistent'] = $re->isPersistent() ?: NULL;
  20. $_data['isTemporary'] = $re->isTemporary() ?: NULL;
  21. return $_data;
  22. }