News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Emran Hasan' Blog:
Changing the default controller naming convention in CodeIgniter
September 21, 2009 @ 09:43:09

Emran Hasan has a quick new post to his blog today looking at how you can change the default controller naming scheme that the CodeIgniter framework uses (to prevent things like naming conflicts and the like).

CodeIgniter is one of my favorite framework and I often use it for developing application quickly. Although it is very flexible in most cases, I find its naming convention to be strict. Many times I have faced this problem when my controller's class name and a model/library's class names are the same '" a Fatal error is inevitable.

His method involves extending the core CI_Router class to change the _validate_request method to change the location and the naming convention (from Users to UsersController) for the default controller settings. Code for the update is included.

0 comments voice your opinion now!
codeigniter naming controller default tutorial


blog comments powered by Disqus

Similar Posts

Greg Freeman: Processing data with PHP using STDIN and Piping

VG Tech: Swagger Docs in ZF2 with Examples - Part 2: Swagger UI

PHPBuilder.com: Use PDO to Access Just About Any Database from PHP

DevShed: Controlling Online Forms with Builder Objects in PHP 5 (Part 2)

phpRiot.com: Zend Framework 101: Zend_Cache


Community Events











Don't see your event here?
Let us know!


series framework package hack application component release security symfony2 unittest facebook podcast install database performance hhvm composer language introduction opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework