Does anyone know if there’s a simple way to retrieve the list of models in cakePHP v1.1? For example, if the app has models Student, Teacher, and Grade, I’m looking for a way to get an array of these models. Any suggestions? Thank you much.
Share
It looks like the best way to do this is to simply check which files exist in the models directory and check if they contain a class. I’ve decided that this is the best method based on the fact that this is essentially what the loadModel() function does itself. The code for the loadModel() function can be found here. The program I ended up not needing to get the list of all models, but hopefully this answer can steer people in the right direction if anyone does need such a list.