optimize:autoload增加对extend扩展目录的扫描

This commit is contained in:
yunwuxin
2016-08-10 14:34:12 +08:00
parent 784294f846
commit 37a6494457

View File

@@ -30,7 +30,7 @@ class Autoload extends Command
$classmapFile = <<<EOF $classmapFile = <<<EOF
<?php <?php
/** /**
* ThinkPHP 类库映射定义 * 类库映射
*/ */
return [ return [
@@ -42,6 +42,7 @@ EOF;
'think\\' => LIB_PATH . 'think', 'think\\' => LIB_PATH . 'think',
'behavior\\' => LIB_PATH . 'behavior', 'behavior\\' => LIB_PATH . 'behavior',
'traits\\' => LIB_PATH . 'traits', 'traits\\' => LIB_PATH . 'traits',
'' => realpath(rtrim(EXTEND_PATH))
]; ];
krsort($namespacesToScan); krsort($namespacesToScan);
@@ -114,7 +115,6 @@ EOF;
return $baseDir . (($path !== false) ? var_export($path, true) : ""); return $baseDir . (($path !== false) ? var_export($path, true) : "");
} }
protected function normalizePath($path) protected function normalizePath($path)
{ {
$parts = []; $parts = [];
@@ -202,7 +202,6 @@ EOF;
return $map; return $map;
} }
protected function findClasses($path) protected function findClasses($path)
{ {
$extraTypes = '|trait'; $extraTypes = '|trait';