我試圖設置Doctrine 2與ZF 1.11玩一段時間。我已成功地解決除此之外的所有錯誤:學說2 + zf 1.11
PHP Fatal error: Class 'Doctrine\ORM\Configuration' not found in C:\development\porjects\application\Bootstrap.php on line 258
下面是在bootstrap.php中的_iniDoctrine()函數文件達到由錯誤消息中提到的行258:
protected function _initDoctrine()
{
$this->bootstrap('autoload');
require_once('Doctrine/Common/ClassLoader.php');
// Create the doctrine autoloader and remove it from the spl autoload stack (it adds itself)
require_once 'Doctrine/Common/ClassLoader.php';
$doctrineAutoloader = array(new \Doctrine\Common\ClassLoader(), 'loadClass');
spl_autoload_unregister($doctrineAutoloader);
$autoloader = Zend_Loader_Autoloader::getInstance();
// Push the doctrine autoloader to load for the Doctrine\ namespace
$autoloader->pushAutoloader($doctrineAutoloader, 'doctrine');
$classLoader = new \Doctrine\Common\ClassLoader('Entities', realpath(__DIR__ . '/models/'), 'loadClass');
$autoloader->pushAutoloader(array($classLoader, 'loadClass'), 'Entities');
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', realpath(__DIR__ . '/../library/Doctrine/'), 'loadClass');
$autoloader->pushAutoloader(array($classLoader, 'loadClass'), 'Symfony');
$doctrineConfig = $this->getOption('doctrine');
$config = new \Doctrine\ORM\Configuration();
顯然,應用程序無法'查看'配置類(和文件)。如果我在實例化類之前手動要求該類。另一個類/文件出現「看不見」。 '手動'修復絕對不會。
包含這些文件的Doctrine文件夾位於我的包含路徑中。我在網上搜索了一些想法。你會建議什麼?謝謝