yes you could use __call() there is some doc on __call() in the errorHandling section of the contoller docs as well as php.net/manual/en/. Problem with that is it would have to be setup for each and every controller that you want static routes for. The custom route is more portable as __call() is frequently defined in custom base controllers. Where as custom routes place no constraints on the base controller classes. So if I were to import your controller into my app, or you were to import the same contoller into another app, you'd risk colliding with another definition of __call().
|