Welcome Guest, Not a member yet? Register   Sign In
Check method/function exist with Controller
#2

Depending where in the application you want this to happen, you can use the _remap function from CI
https://ellislab.com/codeigniter/user-gu...llers.html


PHP Code:
public function _remap($method$params = array())
{
    
$method 'process_'.$method;
    if (
method_exists($this$method))
    {
        return 
call_user_func_array(array($this$method), $params);
    }
    
show_404();

Reply


Messages In This Thread
RE: Check method/function exist with Controller - by trentramseyer - 12-11-2014, 10:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB