Hi folks,
Thanks for reading this...
I was wondering if anyone knew how to enforce a naming convention for class methods. I have written a very basic MVC framework for a project I am about to undertake. Due to strict SEO-friendly guidelines in URI convention that I'm being forced to implement, I need a way to throw an exception if a future developer tries to name a controller action ( aka: class method) with a hypen or dash (-). I have an abstract class for my controllers base class. Just wondering if there was some "magic" way to do this. My class that grabs the configuration out of the URL defaults to index class controller and index action (index method under index class.)
My fear is that, because I have to tack a geographic moniker before my controller call in the URL, if I were to have a future developer create a "do-cartwheels" action that my code may mistakenly try and call the cartwheels action in my index controller instead of the do-cartwheels action in my index controller.
While I'm writing this I think I'm more and more convinced, this should be abstracted out via mod_rewrite. Any thoughts appreciated.
Thanks again.