function LocalDirectoryAdapter::addPear in X Autoload 7.5
Same name and namespace in other branches
- 7.4 lib/Adapter/LocalDirectoryAdapter.php \Drupal\xautoload\Adapter\LocalDirectoryAdapter::addPear()
Adds a PEAR-like prefix.
This will assume with no further checks that $prefix contains no namespace separator.
Parameters
string $prefix: The prefix, e.g. 'Acme_FooPackage_'
string|string[] $paths: An array of paths, or one specific path. E.g. 'lib' for $relative = TRUE, or 'sites/all/libraries/AcmeFooPackage/lib' for $relative = FALSE.
bool $relative: If TRUE, the paths will be relative to $this->localDirectory.
Overrides CommonRegistrationInterface::addPear
File
- src/
Adapter/ LocalDirectoryAdapter.php, line 221
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 addPear($prefix, $paths, $relative = TRUE) {
$relative && $this
->prependToPaths($paths);
$this->master
->addPear($prefix, $paths);
}