Get all of model names in Yii
问题 I am creating a module for our web application. I am using Yii 1.1.14. How do I retrieve all of the model names? I tried this but still I got no luck. 回答1: I am not sure if my understanding of your question is correct. If you have to retrieve the name of all your models, then maybe your approach to the problem at hand is not optimal? Anyway here is what i would approach the problem: foreach(glob('./protected/modules/<module-name>/models/*.php') as $filename){ echo str_replace(".php", "",