Google News
logo
CodeIgniter - Interview Questions
Explain the remapping method calls in CodeIgniter.
The Second segment of URI determines which method is being called. If you want to override it, you can use _remap() method. The _remap method always get called even if URI is different. It overrides the URI.

For Example :
public function _remap($methodName)  
{  
            if ($methodName === 'a_method')  
            {  
            $this->method();  
            }  
            else  
            {  
            $this->defaultMethod();  
            }  
}
Advertisement