First off just want to say the documentation is stellar. I’m using CodeIgniter because of it!
Anyway, I read through everything but the class references and I found a few small things I think might be bugs. SMALL.
Bug On Page: http://codeigniter.com/user_guide/general/routing.html
Is it bug?: - the example shows (:num) not (:any) when in the explanation it says “any”
$route['product/(:num)'] = "catalog/product_lookup_by_id/$1";
A URL with “product” as the first segment, and anything in the second will be remapped to the “catalog” class and the “product_lookup_by_id” method passing in the match as a variable to the function.
Bug On Page: http://codeigniter.com/user_guide/general/routing.html#remapping
Is it bug?: the example has: $this->$method(); and in the next line $this->default_… Shouldn’t it just be $this->method() (maybe it was meant to be $$method() ?)
The overridden function call (typically the second segment of the URI) will be passed as a parameter the _remap() function:
function _remap($method)
{
if ($method == 'some_method')
{
$this->$method();
}
else
{
$this->default_method();
}
}
