Method Argument Validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Method Argument Validation (/showthread.php?tid=45867) |
Method Argument Validation - El Forum - 10-09-2011 [eluser]ranjudsokomora[/eluser] Good Day Fellow CI Followers, I wanted to gather some thoughts on method argument validations. Here is my example method: Code: function page($pageID="",$segment="index") { I was thinking about building a method validation class that would almost be an extension of the CI Form validation class. So the above code would look something like this: Code: function page($pageID="",$segment="index") { My first concern would be how to handle callbacks, since the only way (that I know of) to find the 'calling' class is to use debug_backtrace, which seems a waste of time to me... Any thoughts or suggestions? |