I know this code:
$this->router->fetch_class();
$this->router->fetch_method();
What I want to do is get the whole method available in the current controller or specific controller. Has anyone had the same experience? Thank.
SOLUTIONS
I create a helper to list the entire method in a specific controller
function list_this_controllers_method_except($controller, $except = array())
{
$methods = array();
foreach(get_class_methods($controller) as $method)
{
if (!in_array($method, $except))
{
$methods[] = $method;
}
}
return $methods;
}
source
share