![]() |
CodeIgniter 2 and Doctrine 2 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: CodeIgniter 2 and Doctrine 2 (/showthread.php?tid=31853) |
CodeIgniter 2 and Doctrine 2 - El Forum - 10-13-2010 [eluser]hooflung64[/eluser] Now to just have it work with Modular Separation or the new all in one package. CodeIgniter 2 and Doctrine 2 - El Forum - 10-27-2010 [eluser]kkruecke[/eluser] Quote: I tried something similar except that I dont have a CLI.Assuming you installed Doctrine using pear Code: $ sudo pear install pear.doctrine-project.org/doctrineORM Code: $ pear list -c pear.doctrine-project.org Code: $ ls -1 /usr/share/php/Doctrine Code: <?php CodeIgniter 2 and Doctrine 2 - El Forum - 11-01-2010 [eluser]kkruecke[/eluser] cli-config.php of course goes in your project directory not in /usr/bin. I didn't make that proint clear. CodeIgniter 2 and Doctrine 2 - El Forum - 11-11-2010 [eluser]kkruecke[/eluser] A standalone php program of Doctrine 2 Cookbook example (at least the first portion) is described [url="http://wp.me/pj3WD-vW"]here[/url] CodeIgniter 2 and Doctrine 2 - El Forum - 01-04-2011 [eluser]g_montel[/eluser] [quote author="Prophet" date="1284391454"] So if you would like to create a User class, you need to create application/models/User.php and have it look something like this: Code: namespace models; You can then do something like $user = new models\User; I hope this helps somebody, because it took me a while to work out how to load classes like this.[/quote] THANKS A LOT! It definitely helped ![]() Geoffroy CodeIgniter 2 and Doctrine 2 - El Forum - 01-04-2011 [eluser]kkruecke[/eluser] Of course, you can use place a 'use' statement at the top of the php file in which User will be instantiated. Then you don't need to use the fully qualified name Code: <?php CodeIgniter 2 and Doctrine 2 - El Forum - 01-04-2011 [eluser]g_montel[/eluser] Thanks! I didn't manage to make the cli command working though, if anyone wants to help. Cheers! CodeIgniter 2 and Doctrine 2 - El Forum - 01-16-2011 [eluser]ephlodur[/eluser] Hello ... I need help setting up Codeigniter 2 with Doctrine 2 .. So far I think I have most thing setup but when I try using an example with $this->em->flush(); the app just block... I dont know I to debut it... I have created the table with the cli the get/set with the cli also... $user = new User; print_r($user); $user->setUsername('Eryr'); $user->setPassword('secretPassw0rd'); $this->em = $this->doctrine->em; $this->em->persist($user); This is where the code fail $this->em->flush(); Thanks for any help. CodeIgniter 2 and Doctrine 2 - El Forum - 01-16-2011 [eluser]ephlodur[/eluser] Hello ... I need help setting up Codeigniter 2 with Doctrine 2 .. So far I think I have most thing setup but when I try using an example with $this->em->flush(); the app just block... I dont know I to debut it... I have created the table with the cli the get/set with the cli also... $user = new User; print_r($user); $user->setUsername('Eryr'); $user->setPassword('secretPassw0rd'); $this->em = $this->doctrine->em; $this->em->persist($user); This is where the code fail $this->em->flush(); Thanks for any help. CodeIgniter 2 and Doctrine 2 - El Forum - 02-08-2011 [eluser]tselaty[/eluser] For those still having trouble setting up Doctrine 2 and CodeIgniter 2, take a look at the tutorial I wrote on how to integrate CodeIgniter 2 and Doctrine 2. http://www.tlswebsolutions.com/codeigniter-2-and-doctrine-2-integration-a-working-setup-doctrineignited/ -Tim |