1
0
Fork 0

Making prepend work with fallbacks & coding standards

pull/1324/head
Joe Holdcroft 2012-11-14 11:46:49 +00:00
parent 6510ee5c4c
commit 538cdc914b
1 changed files with 6 additions and 3 deletions

View File

@ -85,7 +85,11 @@ class ClassLoader
{
if (!$prefix) {
foreach ((array) $paths as $path) {
$this->fallbackDirs[] = $path;
if ($prepend) {
array_unshift($this->fallbackDirs, $path);
} else {
$this->fallbackDirs[] = $path;
}
}
return;
@ -100,8 +104,7 @@ class ClassLoader
(array) $paths,
$this->prefixes[$prefix]
);
}
else {
} else {
$this->prefixes[$prefix] = array_merge(
$this->prefixes[$prefix],
(array) $paths