Require_once missing zend doctrine structure

I integrate the doctrine with the Zend Framework. I hit an error reset from cli. It seems that Zend_Application_Bootstrap_Bootstrap does not have require_once for Zend_Application_Bootstrap_BootstrapAbstract. Has anyone hit this?

my cli-config.php

<?php $classLoader = new \Doctrine\Common\ClassLoader('App', __DIR__ . "/../application/models"); $classLoader->register(); $classLoader = new \Doctrine\Common\ClassLoader('Cms', __DIR__ . "/../application/modules/cms-modules/models"); $classLoader->register(); $classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__ . "/../application/models"); $classLoader->register(); $config = new \Doctrine\ORM\Configuration(); $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache); $driverImpl = $config->newDefaultAnnotationDriver(array( __DIR__."/../application/models/App", __DIR__."/../application/modules/cms-modules/models/Cms" )); $config->setMetadataDriverImpl($driverImpl); $config->setProxyDir(__DIR__ . '/Proxies'); $config->setProxyNamespace('Proxies'); // Database connection information $connectionOptions = array( 'driver' => 'pdo_mysql', 'dbname' => 'bella', 'user' => 'username', 'password' => 'password', 'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock' ); $em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config); $helperSet = new \Symfony\Component\Console\Helper\HelperSet( array( 'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) )); 
0
source share
3 answers

The Bootstrap class must extend the Bootstrap Abstract class.

 class Bootstrap extends Zend_Application_Module_Bootstrap { //..... } 
0
source

Zend_Application does not use require_once. This is one of the first packages in ZF 1. * that requires the Zend autoloader.

0
source

Yep, replacing the doctrine class loader with Zend autoloader, did the trick. I had to add the path to namespaces directly to the php path using set_include_path. Is there a better way to do this? I see that the Doctrine class loader allows you to specify both the path and namespace. Thanks for helping Beberley and Alex.

0
source

All Articles