You are here

function ExtendedClassFinderInterface::registerPrefixesDeep in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 src/ClassFinder/ExtendedClassFinderInterface.php \Drupal\xautoload\ClassFinder\ExtendedClassFinderInterface::registerPrefixesDeep()

Register an array of PEAR-style deep paths for given class prefixes.

Note: This actually goes beyond PEAR style, because it also allows "shallow" PEAR-like structures like my_library_Some_Class -> (library dir)/src/Some/Class.php instead of my_library_Some_Class -> (library dir)/src/my/library/Some/Class.php via $finder->registerPrefixDeep('my_library', "$library_dir/src");

Parameters

string[] $map: Associative array, the keys are the prefixes, the values are the directories. This does NOT cover the class named $prefix itself.

\Drupal\xautoload\DirectoryBehavior\DirectoryBehaviorInterface $behavior: If TRUE, then we are not sure if the directory at $path actually exists. If during the process we find the directory to be nonexistent, we unregister the path.

1 method overrides ExtendedClassFinderInterface::registerPrefixesDeep()
ClassFinder::registerPrefixesDeep in lib/ClassFinder/ClassFinder.php
Register an array of PEAR-style deep paths for given class prefixes.

File

lib/ClassFinder/ExtendedClassFinderInterface.php, line 131

Class

ExtendedClassFinderInterface
Class finder interface with additional registration methods.

Namespace

Drupal\xautoload\ClassFinder

Code

function registerPrefixesDeep($map, $behavior = NULL);