Commit 1735b4a4 by 叶明星

注册命名空间

parent 2ae61334
......@@ -21,7 +21,8 @@
"autoload": {
"psr-4": {
"App\\": "app/",
"Common\\": "common/"
"Common\\": "common/",
"ScmWmsCommon\\": "scm_wms_common/"
},
"files": [
"common/function.php",
......
......@@ -279,7 +279,7 @@ class ClassLoader
*/
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
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
......
......@@ -24,6 +24,7 @@ return array(
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'ScmWmsCommon\\' => array($baseDir . '/scm_wms_common'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
......
......@@ -48,6 +48,7 @@ class ComposerStaticInit5c9707cde9ea4e3942300fe24293f04f
'Symfony\\Component\\EventDispatcher\\' => 34,
'Symfony\\Component\\Debug\\' => 24,
'Symfony\\Component\\Console\\' => 26,
'ScmWmsCommon\\' => 13,
),
'P' =>
array (
......@@ -199,6 +200,10 @@ class ComposerStaticInit5c9707cde9ea4e3942300fe24293f04f
array (
0 => __DIR__ . '/..' . '/symfony/console',
),
'ScmWmsCommon\\' =>
array (
0 => __DIR__ . '/../..' . '/scm_wms_common',
),
'Psr\\SimpleCache\\' =>
array (
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