mysql - PHP: Installing doctrine in project -
i trying run doctrine in custom (own) project, isn't based on popular framework.
i've been able following current bootstrap.php;
<?php require dirname(__file__) . '/doctrine/common/classloader.php'; $classloader = new \doctrine\common\classloader('doctrine', dirname(__file__) ); $classloader->register(); // register on spl autoload stack
however have strong feeling far enough , can't find documentation states should next.
running $conn = doctrine_manager::connection('mysql://root:root@192.168.1.4/mytable', 'doctrine');
make php file start throwing errors (fatal error: class 'doctrine_manager' not found) - pretty sure have not completed bootstrap.php properly.
what should make doctrine run intended in own project?
if work way through extensive doctrine documentation on project website, walks through step step what's required proper doctrine bootstrap
added comment on question
i'm there no doctrine_manager in doctrine 2. there's entitymanager. doctrine_manager::connection('mysql://root:root@192.168.1.4/mytable', 'doctrine');
doctrine 1 code.
either way, classes should namespaced \doctrine_manager
here reference you:
doctrine 2 - not same old php orm slide 44 after
Comments
Post a Comment