Yii Framework Forum: Suggestion: Drop "controller" Suffix For Controllers - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Suggestion: Drop "controller" Suffix For Controllers

#1 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 17 May 2013 - 03:26 AM

I wonder, if it wouldn't make sense to drop the "Controller" suffix from controller class names. As we use namespaces there's no potential conflict anymore.

<?php
namespace app/controllers;
use yii/web/Controller;

class Site extends Controller {
    // ...
}



It's pretty obvious that we write a controller class. And as you see we already have to type the word "controller" many times. We'd at least save one occurence of "Controller" in our files. But maybe i'm also missing something.


Opinions?
0

#2 User is online   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,613
  • Joined: 17-January 09
  • Location:Russia

Posted 17 May 2013 - 03:45 AM

https://github.com/y...yii2/issues/260
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
1

#3 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 17 May 2013 - 03:57 AM

Ah, twisted1919 had exactly same thought :). Thanks, the explanation makes sense.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users