function DrupalExtensionAdapter::__construct in X Autoload 7.5
Same name and namespace in other branches
- 7.4 lib/Adapter/DrupalExtensionAdapter.php \Drupal\xautoload\Adapter\DrupalExtensionAdapter::__construct()
Parameters
DrupalSystemInterface $system:
ExtendedClassFinderInterface $finder:
File
- src/Adapter/ DrupalExtensionAdapter.php, line 73 
Class
- DrupalExtensionAdapter
- Service that knows how to register module namespaces and prefixes into the class loader, and that remembers which modules have already been registered.
Namespace
Drupal\xautoload\AdapterCode
function __construct(DrupalSystemInterface $system, ExtendedClassFinderInterface $finder) {
  $this->system = $system;
  $this->finder = $finder;
  $this->namespaceMap = $finder
    ->getNamespaceMap();
  $this->prefixMap = $finder
    ->getPrefixMap();
  foreach (array(
    'module',
    'theme',
  ) as $extension_type) {
    $this->namespaceBehaviors[$extension_type] = new DrupalExtensionNamespaceFinderPlugin($extension_type, $this->namespaceMap, $this->prefixMap, $this->system);
    $this->prefixBehaviors[$extension_type] = new DrupalExtensionUnderscoreFinderPlugin($extension_type, $this->namespaceMap, $this->prefixMap, $this->system);
  }
  $this->defaultBehavior = new DefaultDirectoryBehavior();
}