ControllerBase VS BaseController

I have noticed that you are using ControllerBase instead of BaseController.

What is the reason for that? Why to change the order and to make an exception?



5.7k
edited Jul '14

Because that's not an actual controller. (In fact, you could declare the base controller as an abstract class). So to avoid confusion with being an actual controller (with the name base), the naming is different.



23.7k

@renskill yeah, but then why Laravel uses it differently:

http://laravel.com/docs/controllers

Is ControllerBase the way the PSR-1 or PSR-2 is telling you to use ControllerBase or BaseController?



5.7k

I'm not sure, perhaps Laravel has some kind of 'fixed' BaseController implementation? In Phalcon, how you implement this (and a lot of other things), is less strict / not tied to conventions so much I reckon.

Except for the class-naming, I believe this his little to do with PSR standards?



23.7k
edited Jul '14

Could the main developers explain why they chose ControllerBase instead of BaseController? What about FrontendController vs ControllerFrontend and BackendController vs ControllerBackend?