function LocalDirectoryAdapter::addPsr4 in X Autoload 7.5
Same name and namespace in other branches
- 7.4 lib/Adapter/LocalDirectoryAdapter.php \Drupal\xautoload\Adapter\LocalDirectoryAdapter::addPsr4()
Adds a PSR-4 style namespace.
Parameters
string $prefix:
string|\string[] $paths:
bool $relative: If TRUE, the paths will be relative to $this->localDirectory.
Overrides CommonRegistrationInterface::addPsr4
File
- src/
Adapter/ LocalDirectoryAdapter.php, line 182
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\AdapterCode
function addPsr4($prefix, $paths, $relative = TRUE) {
$relative && $this
->prependToPaths($paths);
$this->master
->addPsr4($prefix, $paths);
}