[eluser]esra[/eluser]
[quote author="gunter" date="1184530343"]has someone tried Doctrine and can help me?
I want try it, but cannot download it - the download link is broken and the other download possibility is via svn, that I don´t know to use...
maybe someone can mail me the zipped package? (please ask first)[/quote]
You can't just drop Doctrine in a directory and expect it to work. You need to write a new DBO to integrate Doctrine with CI and will most likely need to write a new Model library. The Model method in Loader may have to be overloaded (not sure about this without looking).
The better way of handling this is to write a new PHP5 DBO based on the use of PHP5 interfaces and write one interface for each supported DBAL, including the CI DBAL. To automate interface loading, you can create an interface parameter for the database.php config. Most ORMs are dependent on a specific DBAL--Doctrine needs PDO, Propel needs Creole, etc. Then adding support for new DBALs (and their associated ORMs) would be a matter of writing a new interface.
[eluser]Derek Allard[/eluser]
Good points esra, I wish I had god answers for you, but truthfully I'm not sure what Rick based the original on, or what future plans are at this stage. Thanks for this useful post.
[eluser]Rick Jolly[/eluser]
gunter, I've been playing with Doctrine. Maybe I can help if you are still in need?
[eluser]gunter[/eluser]
oh yes please, Rick! (Sorry, haven´t seen your post until now)
I had problems to get the whole system to run. (Some class not found errors)
I tried doctrine 2 weeks ago, and I cannot find now my nonworking scripts but I remember, I had some class not found errors.
I will try again at the weekend and if I still have no success than I will call you, okay?
[eluser]Rick Jolly[/eluser]
Sure, PM me if you like.
Some things that might help:
1) If you put the Doctrine stuff in your libraries folder, include it in your scripts like this:
require_once(APPPATH . '/libraries/doctrine/lib/Doctrine.php');
2) I took the advice of the user manual and "compiled" it. That solved a lot of problems because then I didn't need to set the include path or use the spl_autoload_register(array('Doctrine', 'autoload')); function. To compile it, just include Doctrine.php like in step #1 above, put this in your script: Doctrine::compile();, and run the script - it takes some time. Now you can include the compiled version of Doctrine and all the common classes will be automatically included by using:
require_once(APPPATH . '/libraries/doctrine/lib/Doctrine.compiled.php');
3) Remember to include your database object classes. I put mine in a doctrine folder in the models folder so my includes looked like this: require_once(APPPATH . '/models/doctrine/MyClass.php');
A beta release is due Aug 31, so things may change soon.