public static function findDriverAutoloadDirectory($namespace,
$root, ?bool
$include_test_drivers = NULL
) { // As explained by this method's documentation, return FALSE if the
// namespace is not a sub-namespace of a Drupal module.
if (!
static::
isWithinModuleNamespace($namespace)) { return FALSE;
} // Extract the module information from the namespace.
[,
$module,
$module_relative_namespace] =
explode('\\',
$namespace, 3
);
// The namespace is within a Drupal module. Find the directory where the
// module is located.
$extension_discovery =
new ExtensionDiscovery($root, FALSE,
[]);
$modules =
$extension_discovery->
scan('module',
$include_test_drivers);
if (!
isset($modules[$module])) {