You are here

function ClassFinderAdapter::__construct in X Autoload 7.5

Same name and namespace in other branches
  1. 7.4 lib/Adapter/ClassFinderAdapter.php \Drupal\xautoload\Adapter\ClassFinderAdapter::__construct()

Parameters

ExtendedClassFinderInterface $finder: The class finder object.

ClassMapGeneratorInterface $classmap_generator:

File

src/Adapter/ClassFinderAdapter.php, line 57

Class

ClassFinderAdapter
An instance of this class is passed around to implementations of hook_xautoload(). It acts as a wrapper around the ClassFinder, to register stuff.

Namespace

Drupal\xautoload\Adapter

Code

function __construct($finder, $classmap_generator) {
  $this->finder = $finder;
  $this->prefixMap = $finder
    ->getPrefixMap();
  $this->namespaceMap = $finder
    ->getNamespaceMap();
  $this->defaultBehavior = new DefaultDirectoryBehavior();
  $this->psr0Behavior = new Psr0DirectoryBehavior();
  $this->classMapGenerator = $classmap_generator;
}