You are here

public static function Utils::ExtensionData in Drupal driver for SQL Server and SQL Azure 8

Same name and namespace in other branches
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Utils.php \Drupal\Driver\Database\sqlsrv\Utils::ExtensionData()

Get some info about extensions...

Parameters

\ReflectionExtension $re:

Return value

array

1 call to Utils::ExtensionData()
sqlsrv_requirements in ./sqlsrv.install
Implements hook_requirements().

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Utils.php, line 123

Class

Utils

Namespace

Drupal\Driver\Database\sqlsrv

Code

public static function ExtensionData($name) {
  $re = new \ReflectionExtension($name);
  $_data = [];
  $_data['getName'] = $re
    ->getName() ?: NULL;
  $_data['getVersion'] = $re
    ->getVersion() ?: NULL;
  $_data['getClassName'] = PHP_EOL . implode(", ", $re
    ->getClassNames()) ?: NULL;
  foreach ($re
    ->getConstants() as $key => $value) {
    $_data['getConstants'] .= "\n{$key}:={$value}";
  }
  $_data['getDependencies'] = $re
    ->getDependencies() ?: NULL;
  $_data['getFunctions'] = PHP_EOL . implode(", ", array_keys($re
    ->getFunctions())) ?: NULL;
  $_data['getINIEntries'] = $re
    ->getINIEntries() ?: NULL;
  $_data['isPersistent'] = $re
    ->isPersistent() ?: NULL;
  $_data['isTemporary'] = $re
    ->isTemporary() ?: NULL;
  return $_data;
}