Yii Framework Forum: Gii Module Generator Bug - Yii Framework Forum

Jump to content

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

Gii Module Generator Bug It Generates "Controller" instead of "CController" Rate Topic: -----

#1 User is offline   Yii.Mahdi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 20-November 12

Posted 21 November 2012 - 07:38 AM

Hi there,

I'm pretty new with Yii. I was trying to generate some sample Modules with Gii. After Gii finished I got an error on the generated code, when I checked that I saw this:

class DefaultController extends Controller


As I said I'm not expert, but as far as I read all the Yii classes should start with a capital "C" letter to avoid the conflicts with user defined classes. So, I just changed the "Controller" to "CController" and the error gone!

I'm not sure, maybe there are differences between Modules and other things in Yii, but otherwise it looks like a bug.
0

#2 User is offline   Imre 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 30-March 11

Posted 29 November 2012 - 09:56 AM

There is Controller.php in protected/components.

It is not a framework file but is automatically generated for you and it is ok for you to modify for your own needs.

This defines some variables that are used by gii generated CRUD.

Not a bug.
0

#3 User is offline   Yii.Mahdi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 20-November 12

Posted 03 December 2012 - 02:59 AM

Oh, thanks man for the description! Good to know that :)
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