Add support for multiple packages defining the same namespace prefix
parent
bd712db727
commit
5e3c55f171
|
@ -54,8 +54,15 @@ class ClassLoader
|
|||
*/
|
||||
public function add($prefix, $paths)
|
||||
{
|
||||
if (isset($this->prefixes[$prefix])) {
|
||||
$this->prefixes[$prefix] = array_merge(
|
||||
$this->prefixes[$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
} else {
|
||||
$this->prefixes[$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this instance as an autoloader.
|
||||
|
|
Loading…
Reference in New Issue