aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/composer/ClassLoader.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-19 17:13:26 -0700
committerzotlabs <mike@macgirvin.com>2017-03-19 17:13:26 -0700
commitf746418fda3f29f4635a26c744990911e8fb6309 (patch)
treeec4f7bba45ca205c2edbd7ca730c4179ac20b083 /vendor/composer/ClassLoader.php
parentbe10bf2cebd5d3ee449901cbf6814bf9a284bd10 (diff)
parent1bdab6e633fd023432ed86ad898da1fe4ddc470f (diff)
downloadvolse-hubzilla-f746418fda3f29f4635a26c744990911e8fb6309.tar.gz
volse-hubzilla-f746418fda3f29f4635a26c744990911e8fb6309.tar.bz2
volse-hubzilla-f746418fda3f29f4635a26c744990911e8fb6309.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'vendor/composer/ClassLoader.php')
-rw-r--r--vendor/composer/ClassLoader.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index ff6ecfb82..795376e87 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -348,9 +348,13 @@ class ClassLoader
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
- foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
- if (0 === strpos($class, $prefix)) {
- foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
+ $subPath = $class;
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
+ $subPath = substr($subPath, 0, $lastPos);
+ $search = $subPath.'\\';
+ if (isset($this->prefixDirsPsr4[$search])) {
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
+ $length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
return $file;
}