Making prepend work with fallbacks & coding standards
parent
6510ee5c4c
commit
538cdc914b
|
@ -85,7 +85,11 @@ class ClassLoader
|
||||||
{
|
{
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
foreach ((array) $paths as $path) {
|
foreach ((array) $paths as $path) {
|
||||||
$this->fallbackDirs[] = $path;
|
if ($prepend) {
|
||||||
|
array_unshift($this->fallbackDirs, $path);
|
||||||
|
} else {
|
||||||
|
$this->fallbackDirs[] = $path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -100,8 +104,7 @@ class ClassLoader
|
||||||
(array) $paths,
|
(array) $paths,
|
||||||
$this->prefixes[$prefix]
|
$this->prefixes[$prefix]
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$this->prefixes[$prefix] = array_merge(
|
$this->prefixes[$prefix] = array_merge(
|
||||||
$this->prefixes[$prefix],
|
$this->prefixes[$prefix],
|
||||||
(array) $paths
|
(array) $paths
|
||||||
|
|
Loading…
Reference in New Issue