我已经看到Symfony中有一个autoload_namespace.php文件,但我似乎无法让它工作。
我想自动加载:Symfony \ Component \ HttpFoundation \ Session \ Session命名空间。
到目前为止,这是autoload_namespace.php
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Twig_' => array($vendorDir . '/twig/twig/lib'),
'SensioLabs\\Security' => array($vendorDir . '/sensiolabs/security-checker'),
'Psr\\Log\\' => array($vendorDir . '/psr/log'),
'Doctrine\\ORM\\' => array($vendorDir . '/doctrine/orm/lib'),
'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib'),
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'),
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'),
'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'),
'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'),
//this is the session namespace i want to auto include
'Symfony\\Component\\HttpFoundation\\Session\\Session\\' => array($vendorDir . '/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php')
);
由于