Estoy usando la integración oficial de Doctrine, la estructura que uso es esta
application
- library
-- bin
---- doctrine
---- doctrine.php
-- Bisna
-- Application
---- Resource
------ Doctrine.php
-- Doctrine
---- Container.php
-- Exception
-- Doctrine
---- Common
---- DBAL
---- ORM
---- Symfony
-- Doctrine
modifiqué bootstrap.php
Código PHP:
Ver originalclass Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
public function _initAutoloaderNamespaces()
{
require_once APPLICATION_PATH . '/../library/Doctrine/Common/ClassLoader.php';
$autoloader = \Zend_Loader_Autoloader::getInstance();
$fmmAutoloader = new \Doctrine\Common\ClassLoader('Bisna');
$autoloader->pushAutoloader(array($fmmAutoloader, 'loadClass'), 'Bisna'); }
}
y configs/application.ini
Cita: includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
pluginPaths.Bisna\Application\Resource\ = "Bisna/Application/Resource"
autoloaderNamespaces[] = Bisna
autoloaderNamespaces[] = Application\Entity
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.doctrine.classLoader.loaderClass = "Doctrine\Common\ClassLoader"
resources.doctrine.classLoader.loaderFile = APPLICATION_PATH "/../library/Doctrine/Common/ClassLoader.php"
resources.doctrine.classLoader.loaders.doctrine_co mmon.namespace = "Doctrine\Common"
resources.doctrine.classLoader.loaders.doctrine_co mmon.includePath = APPLICATION_PATH "/../library/Doctrine/Common"
resources.doctrine.classLoader.loaders.doctrine_db al.namespace = "Doctrine\DBAL"
resources.doctrine.classLoader.loaders.doctrine_db al.includePath = APPLICATION_PATH "/../library/Doctrine/DBAL"
resources.doctrine.classLoader.loaders.doctrine_or m.namespace = "Doctrine\ORM"
resources.doctrine.classLoader.loaders.doctrine_or m.includePath = APPLICATION_PATH "/../library/Doctrine/ORM"
resources.doctrine.classLoader.loaders.symfony_con sole.namespace = "Symfony\Component\Console"
resources.doctrine.classLoader.loaders.symfony_con sole.includePath = APPLICATION_PATH "/../library/Doctrine/Symfony/Component/Console"
resources.doctrine.classLoader.loaders.symfony_yam l.namespace = "Symfony\Component\Yaml"
resources.doctrine.classLoader.loaders.symfony_yam l.includePath = APPLICATION_PATH "/../library/Doctrine/Symfony/Component/Yaml"
cuando ejecuto
'php doctrine' me arroja este mensaje:
Warning: require(C:\xampp\htdocs\libro2\application/../library/Doctrine/Symfony/
Component/Console\Symfony\Component\Console\Application.php) : failed to open str
eam: No such file or directory in C:\xampp\htdocs\libro2\library\Doctrine\Common
\ClassLoader.php on line 148
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\libro2\applicat
ion/../library/Doctrine/Symfony/Component/Console\Symfony\Component\Console\Appl
ication.php' (include_path='C:\xampp\htdocs\libro2\application/../library;C:\xam
pp\htdocs\libro2\library;.;C:\xampp\php\library;C: \xampp\php\PEAR') in C:\xampp\
htdocs\libro2\library\Doctrine\Common\ClassLoader. php on line 148
imagino que los paths no están bien, pero quisiera saber donde más tendría que arregar estas rutas.
gracias