I am planning to use doctrine to write a module of my app which is built with codeigniter.
I have a very basic question : lets say I have a table called "user", with doctrine generate-models from db, 3 classes are generated BaseUser.php, User.php and UserTable.php. Now as I saw in the examples they use User class straigtaway. Should I be doing this ? I need additional business functionality for the user objects. So should I create a codeigniter model user_model and then use User class inside it (aggregation) or somehow extend user class ( i dont know how this will be done as user_model extends model)
Am little confused on this one and cannot locate any appropriate literature for the same. Any help would be appreciated.
thanks in advance,
For anyone who is interested - I’ve posted up a project starter on my blog - a dev ready incorporation of the following technologies:
Some features of this project starter are: - CodeIgniter Models have been replaced with Doctrine Records - Doctrine is loaded into CI as a plugin - RoR type before and after filters…. - Doctrine transactions automatically wrapped around every action at execution time (ATOMIC db updates)
Basic Role based security (I think Redux may be in there as well?) Simply extract, hook up the database.php config file and viola…. You can start coding your layouts, views and models. Probably a few things to iron out - but enjoy!
Hope it helps
GET IT AT: http://thecodeabode.blogspot.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With