Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord for CodeIgniter: Rails-style model interactions
#22

[eluser]sophistry[/eluser]
there are some comments on that overloading() php.net page that show how to use call_user_func() to sort of mimic the slick __call() style method overloading available in PHP5. in fact, the current latest comment on that call_user_func() page shows a nice example of how to do dynamic method mapping in PHP4.

so, i think it is possible to modify or adapt the ROR style AR class you've got here to support PHP4, but it would probably involve syntax changes - or some clever class structures. specifically, you would probably have to handle the name of the table column as a function parameter rather than tucking it into the method call.


Messages In This Thread
ActiveRecord for CodeIgniter: Rails-style model interactions - by El Forum - 09-24-2007, 09:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB