Remap function for codeigniter esque framework

February 18, 2011   

Adding this function to any controller will enable your application to pass URI parameters to the index function. Which currently it will not do by default.

function _remap($method){
    if (method_exists($this, $method)){
        $this->$method();
    }else {
        $this->index($method);
    }
}

blog comments powered by Disqus