CodeIgniter - Doctrine ORM Tutorial : A way of enhancing CI |
[eluser]jwright[/eluser]
Actually I did get it working using the latest Modular Seperation in this thread http://ellislab.com/forums/viewthread/12...40/#667656 Now to figure out the best way to use it from other modules.
[eluser]jwright[/eluser]
@lane4 @wiredesignz After looking into this, it seems there is more to it than I could see initially. My goal is to combine the power of Modular_Extensions (or Modular Separation) and Doctrine. But I can't see the most appropriate way to do so.
[eluser]Burak Guzel[/eluser]
What part are you having problems with? Getting the plugin to load or getting the models to work? I have no experience with Matchbox or HMVC, so I'm not sure if I can help.
[eluser]jwright[/eluser]
Just to clarify, I have got Doctrine working within a module using wiredesignz Modular Separation code and I don't think I'd have a problem getting it working with his HMVC code either (since it's from the same codebase according to wiredesignz). I'm trying to figure out the best application architecture using these two. I'd like to achieve a few features... - one Doctrine installation powering multiple modules - ability to use the migrations feature of Doctrine (in/with multiple modules) - each module can load other modules and there can be module dependencies (meaning modules depending on other modules) - the above while maintaining the modularity of the modules, meaning that we can still copy a module folder into the modules folder of any HMVC/Doctrine/CI install and it can work with little or no configuration of the module I know this is all a bit fuzzy and incomplete talking about it without concrete examples. Articulating it in this post has helped me see a little clearer how it might all fit together. Hopefully I can put something together soon and share it for review and improvement/alternative suggestions.
[eluser]wiredesignz[/eluser]
Try this as a library alternative: Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); application/config/autoload.php Code: $autoload['libraries'] = array('doctrine_orm'); Usage: Code: $dao = Doctrine_ORM::Factory('module/model'); Note: The Doctrine libraries should be located in a new application/vendor/Doctrine directory.
[eluser]jwright[/eluser]
@wiredesignz this code is interesting. At first I thought the $dao would be like a "Doctrine::" class for just that model folders domain model. But after looking closer actually, I'm not sure how to use $dao... Also, I've started a new topic about this CodeIgniter + Doctrine + HMVC
[eluser]Unknown[/eluser]
To make the process easier of using Doctrine with CodeIgnitier, we've developed the Doctrine CodeIgniter LIbrary. Enjoy!
[eluser]albertleao[/eluser]
I've been using PHPActiveRecord. How does Doctrine compare with that? |
Welcome Guest, Not a member yet? Register Sign In |