Writing a proper _remap function |
[eluser]Bramme[/eluser]
Hey all. I'm working on a little website that has some static pages, but most of the content is stored in the database. I thought of using one front end controller, with functions for each of the static pages and then a _remap function to catch the calls to the the database stored pages. Here's how my function looks right now: Code: function _remap($method){ Line 25 happens to be the "if (method_exists())" check. How do I solve this?
[eluser]Bramme[/eluser]
Okay, silly me. I just didn't read the method_exists manual properly... It's supposed to be "if (method_exists($this, $method))". Now it works like a charm. However, feel free to look at my _remap function and point out if anything could be done better.
[eluser]sophistry[/eluser]
see site_migrate in the wiki for a general purpose solution to this... here it is cheers. |
Welcome Guest, Not a member yet? Register Sign In |