You are here

function LocalDirectoryAdapter::addMultiplePsr4 in X Autoload 7.5

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

Adds multiple PSR-4 namespaces.

Parameters

array $map: Each array key is a namespace, e.g. "Acme\\FooPackage\\". Each array value is either a PSR-4 base directory or an array of PSR-4 base directories.

bool $relative: If TRUE, the paths will be relative to $this->localDirectory.

Overrides ClassFinderAdapterInterface::addMultiplePsr4

File

src/Adapter/LocalDirectoryAdapter.php, line 127

Class

LocalDirectoryAdapter
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 addMultiplePsr4(array $map, $relative = TRUE) {
  $relative && $this
    ->prependMultiple($map);
  $this->master
    ->addMultiplePsr4($map);
}