function ClassFinderAdapter::addPearFlat in X Autoload 7.5
Adds a prefix similar to PEAR, but with flat directories.
This will assume with no further checks that $prefix contains no namespace separator.
Parameters
string $prefix:
string[]|string $paths:
Overrides CommonRegistrationInterface::addPearFlat
File
- src/
Adapter/ ClassFinderAdapter.php, line 276
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\AdapterCode
function addPearFlat($prefix, $paths) {
$logical_base_path = Util::prefixLogicalPath($prefix);
foreach ((array) $paths as $deep_path) {
$deep_path = strlen($deep_path) ? rtrim($deep_path, '/') . '/' : '';
$this->prefixMap
->registerDeepPath($logical_base_path, $deep_path, $this->defaultBehavior);
}
}