Welcome Guest, Not a member yet? Register   Sign In
arguments to a controller instead of function
#4

[eluser]mddd[/eluser]
Not neccessarily. There are functions you can use. Like method_exists():
Code:
if (method_exists($requested_method))
  $this->$requested_method();
This takes care of ALL the methods in your controller. If nothing is found, you can switch over to the generic case (e.g. looking up the user by name).


Messages In This Thread
arguments to a controller instead of function - by El Forum - 07-07-2010, 05:07 AM
arguments to a controller instead of function - by El Forum - 07-07-2010, 05:24 AM
arguments to a controller instead of function - by El Forum - 07-07-2010, 06:09 AM
arguments to a controller instead of function - by El Forum - 07-07-2010, 06:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB