[eluser]Unknown[/eluser]
Here's a sweet trick I use with my controllers. I know CodeIgniter doesn't use namespaces (and I understand that's not the most important point), but why don't use some of the advantages of PHP 5.3 ?
Simply change in CodeIgniter.php
Code:
$class = $RTR->fetch_class();
by
Code:
$directory = str_replace('/','\\',$RTR->fetch_directory());
$class = 'controllers\\'.$directory.$RTR->fetch_class();
Now, you can add the namespace line on the top of your controller files, and use the same name twice (or more). This trick prevents collisions from your models folder too (using namespaces for your objects is the best way to solve that issue once and for all).
What do you think about ?