allow addon autoloaders to specify absolute namespace classes starting with \
This commit is contained in:
parent
b497faee27
commit
0503b11840
2
boot.php
2
boot.php
@ -634,6 +634,8 @@ class ZotlabsAutoloader {
|
|||||||
}
|
}
|
||||||
$arr = explode('\\',$className);
|
$arr = explode('\\',$className);
|
||||||
if($arr && count($arr) > 1) {
|
if($arr && count($arr) > 1) {
|
||||||
|
if(! $arr[0])
|
||||||
|
$arr = array_shift($arr);
|
||||||
$filename = 'addon/' . lcfirst($arr[0]) . '/' . ucfirst($arr[1]) . ((count($arr) === 2) ? '.php' : '/' . ucfirst($arr[2]) . ".php");
|
$filename = 'addon/' . lcfirst($arr[0]) . '/' . ucfirst($arr[1]) . ((count($arr) === 2) ? '.php' : '/' . ucfirst($arr[2]) . ".php");
|
||||||
if (file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
include($filename);
|
include($filename);
|
||||||
|
Reference in New Issue
Block a user