ActiveRecord for CodeIgniter: Rails-style model interactions |
[eluser]Matthew Pennell[/eluser]
Following on from this thread, I have now got my version of ActiveRecord (based on RoR's implementation) to a point where I'd like to get some more pairs of eyes on it. I've written up the class and provided a download here: ActiveRecord Class on the wiki I'm using it at the moment on a project in development, and it seems to be working fine - no noticeable impact on performance or query speed, and it makes developing a lot faster without having to write CRUD functions for every single model. In summary, it means that you can do things like this without having to write all the database interaction code yourself: Code: $me = $this->Person->find_by_first_name('Buddy'); Note that it's PHP5 only. |
Welcome Guest, Not a member yet? Register Sign In |