Model folder

Hello everyone and happy new year,

i have a new problem. I need to map all tablename to the model class. Is there a way to do this?

i thought about something like: get the registered Model folder (is that possible over the modelManager? i didnt found a method for something like that) and then just call every models getSource method.

thanks for your help pat

You could possibly get the Model directory if you set up the config in the DI. Then perhaps $this->config->phalcon->modelsDir;

Hope that helps a bit.

Thanks for the reply. but that would also mean that everyone who is using my plugin has to use this exact config key for the models. mine for example is called "entitiesDir"

Hope there will be a real method or something for that



I do not really understand. Are you dealing with a plugn or with models ?

You can use namespaces