You are here

function ExtendedClassFinderInterface::registerPrefixDeep in X Autoload 7.4

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

Register a PEAR-style deep path for a given class prefix.

Note: This actually goes beyond PEAR style, because it also allows things 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 $prefix: Prefix, e.g. "My_Prefix", for classes like "My_Prefix_SomeClass". This does NOT cover the class named "My_Prefix" itself.

string $deep_path: The deep path, e.g. "../lib/My/Prefix", for classes placed in My_Prefix_SomeClass -> ../lib/My/Prefix/SomeClass.php

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::registerPrefixDeep()
ClassFinder::registerPrefixDeep in lib/ClassFinder/ClassFinder.php
Register a PEAR-style deep path for a given class prefix.

File

lib/ClassFinder/ExtendedClassFinderInterface.php, line 108

Class

ExtendedClassFinderInterface
Class finder interface with additional registration methods.

Namespace

Drupal\xautoload\ClassFinder

Code

function registerPrefixDeep($prefix, $deep_path, $behavior = NULL);