简体   繁体   中英

How to set a new includePath in application.ini

I am using Zend framework 2 and i am trying to make a Custom includePath in the application.ini file. The includePath should include all the files in the selected folder and all files in all it's subfolders.

I already have

 includePaths.models = APPLICATION_PATH "/models"

but this only includes the files in the models folder and not the files in the models subfolders.

In ZF2 there are no application-level models, every model should be part of a Module . After that, every Module knows how and where to load their own models and you can set specific paths for models if really necessary in module.config.php .

There are more details about Modules in official zf2 documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM