Welcome Guest, Not a member yet? Register   Sign In
Function in Controller
#6

[eluser]Matt S.[/eluser]
Prepend do_nothing() with an underscore, like so:

Code:
function _do_nothing()
{

}

This will make it "private" and prevent it from being called from the URL. You can optionally remap it to a different method using the _remap method.

Code:
function _remap($method)
{
    if($method == 'do_nothing')
    {
          $this->index();
    }
}


Messages In This Thread
Function in Controller - by El Forum - 11-26-2010, 07:31 AM
Function in Controller - by El Forum - 11-26-2010, 07:33 AM
Function in Controller - by El Forum - 11-26-2010, 07:36 AM
Function in Controller - by El Forum - 11-26-2010, 07:57 AM
Function in Controller - by El Forum - 11-26-2010, 08:12 AM
Function in Controller - by El Forum - 11-27-2010, 02:25 AM
Function in Controller - by El Forum - 11-27-2010, 03:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB