Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using doctrine with codeigniter

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,

like image 359
shikhar Avatar asked Jan 17 '10 07:01

shikhar


1 Answers

For anyone who is interested - I’ve posted up a project starter on my blog - a dev ready incorporation of the following technologies:

  • ExtJS : client side JS library,
  • CodeIgniter : presentation + domain tier,
  • Doctrine : ORM data layer framework

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

like image 153
Beano Avatar answered Sep 20 '22 04:09

Beano