If you name a controller as
the name of the action should be:
actionIndex or indexAction or index
Yii uses the 1st but most of the frameworks out there (sf, zend, java-struts) uses the 2nd style,… akelos, Codeigniter and cakePHP do not use the
action word at all (3er style)
IMHO name+Controller and name+Action seems to be more intuitive…
but I’m curious about the
What do you think?
May 25, 2012, 2:14am
If Yii wanted to be consistent, the 2nd option should be used - siteController / indexAction.
However, this is really a minor issue!
I prefer indexAction just because is easy search method. If you use netbeans, u can press "Ctrl+7". This shortcut open the navigator of the class. And u can type action name. And get the right method. Press enter, and focus it.
I agree but for a framework that uses ‘convention over configuration’…
having ‘issues’ in convention is at least annoying.
I’m sure Yii2 will be the