Commit 1735b4a4 by 叶明星

注册命名空间

parent 2ae61334
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"App\\": "app/", "App\\": "app/",
"Common\\": "common/" "Common\\": "common/",
"ScmWmsCommon\\": "scm_wms_common/"
}, },
"files": [ "files": [
"common/function.php", "common/function.php",
......
...@@ -279,7 +279,7 @@ class ClassLoader ...@@ -279,7 +279,7 @@ class ClassLoader
*/ */
public function setApcuPrefix($apcuPrefix) public function setApcuPrefix($apcuPrefix)
{ {
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
} }
/** /**
...@@ -377,7 +377,7 @@ class ClassLoader ...@@ -377,7 +377,7 @@ class ClassLoader
$subPath = $class; $subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) { while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos); $subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\'; $search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) { if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) { foreach ($this->prefixDirsPsr4[$search] as $dir) {
......
...@@ -24,6 +24,7 @@ return array( ...@@ -24,6 +24,7 @@ return array(
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'ScmWmsCommon\\' => array($baseDir . '/scm_wms_common'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
......
...@@ -48,6 +48,7 @@ class ComposerStaticInit5c9707cde9ea4e3942300fe24293f04f ...@@ -48,6 +48,7 @@ class ComposerStaticInit5c9707cde9ea4e3942300fe24293f04f
'Symfony\\Component\\EventDispatcher\\' => 34, 'Symfony\\Component\\EventDispatcher\\' => 34,
'Symfony\\Component\\Debug\\' => 24, 'Symfony\\Component\\Debug\\' => 24,
'Symfony\\Component\\Console\\' => 26, 'Symfony\\Component\\Console\\' => 26,
'ScmWmsCommon\\' => 13,
), ),
'P' => 'P' =>
array ( array (
...@@ -199,6 +200,10 @@ class ComposerStaticInit5c9707cde9ea4e3942300fe24293f04f ...@@ -199,6 +200,10 @@ class ComposerStaticInit5c9707cde9ea4e3942300fe24293f04f
array ( array (
0 => __DIR__ . '/..' . '/symfony/console', 0 => __DIR__ . '/..' . '/symfony/console',
), ),
'ScmWmsCommon\\' =>
array (
0 => __DIR__ . '/../..' . '/scm_wms_common',
),
'Psr\\SimpleCache\\' => 'Psr\\SimpleCache\\' =>
array ( array (
0 => __DIR__ . '/..' . '/psr/simple-cache/src', 0 => __DIR__ . '/..' . '/psr/simple-cache/src',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment