CodeIgniter 2 and Doctrine 2 |
[eluser]hooflung64[/eluser]
Now to just have it work with Modular Separation or the new all in one package.
[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
[eluser]kkruecke[/eluser]
cli-config.php of course goes in your project directory not in /usr/bin. I didn't make that proint clear.
[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]
[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
[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
[eluser]g_montel[/eluser]
Thanks! I didn't manage to make the cli command working though, if anyone wants to help. Cheers!
[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.
[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.
[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/codeignit...neignited/ -Tim |
Welcome Guest, Not a member yet? Register Sign In |