Class 'backend\models\Product' does not exist or has syntax error.

I have quite a few models which i have generated using the model generator.

one of the models has this issue that it is giving the below error on using CRUD generator for the model Product.

Class ‘backend\models\Product’ does not exist or has syntax error.

i deleted and retried creating the rest of the models again. no issues with that.

now i went through the Products.php model file for syntax errors. no errors found.

can you please help me how to debug this issue?

i need a lead on how gii works…?

using latest - yii 2.0.6 advanced.

sorry my bad…

the model had a method getAttributes()…

this is actually a method in the model class… so i cant use this like i wanted(how it was generated by the model generator)…

renamed this method… and error was resolved…

how i debugged…

went to gii/generator.php

commented out exception handling in validateClass

saw that the next time i ran … got the real error…