ActiveRecord for CodeIgniter: Rails-style model interactions |
[eluser]Matthew Pennell[/eluser]
[quote author="nmweb" date="1190425550"]Great work, I really like it and am definitely gonna use it in my next project. I, however, need to tweak it to PHP4. At first glance this seems feasible, or is there anything exotic you used?[/quote] I'm afraid it's impossible (AFAIK) to convert this to PHP4, due to its use of the __call() function. It catches any calls to non-existent methods, such as find_by_my_random_database_field('foobar'), and re-routes them to the right method - in that example, it would end up at find_by('my_random_database_field', 'foobar'). You can't replicate that in PHP4 without creating all those find and fetch methods explicitly, which would be far too much work. Read more about PHP5's overloading here |
Welcome Guest, Not a member yet? Register Sign In |