summaryrefslogtreecommitdiffstats
path: root/vendor/composer/ClassLoader.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/composer/ClassLoader.php')
-rw-r--r--vendor/composer/ClassLoader.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index 70d78bc3f..5e1469e83 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -54,6 +54,8 @@ class ClassLoader
private $useIncludePath = false;
private $classMap = array();
+ private $classMapAuthoritative = false;
+
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@@ -249,6 +251,27 @@ class ClassLoader
}
/**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
@@ -299,6 +322,9 @@ class ClassLoader
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
+ if ($this->classMapAuthoritative) {
+ return false;
+ }
$file = $this->findFileWithExtension($class, '.php');