简体   繁体   中英

Prevent zend framework tool from adding new models to module

How can i prevent zf-tool from creating models in module directories?

When i add a model using The Zend Framework Tool (1.10.6) as follows:

zf create model test

zf creates my test model in the application/modules/admin folder. can someone tell me how to create a model in the default models map?

As far as i know, the admin module is not set as a default to create models in. the admin module is the only module i'm using.

Thanx!

With Zend tool i added some extra modules for debugging purposes. Each time i add models using

zf create model test

Zend adds the model to my first created module named admin. I added a module called aaaaa to test if it adds the model to the first module it finds in de directory path. It still adds the model to admin.

It seems like I somehow added a "rule" to add new models to the admin directory. But i realy don't know I did this.

After debugging a while, i probably found out what was going wrong. It seems like my .zfproject.xml file was corrupted.

I made a new project and copied the xml file from the new project, to the existing project.

This fixed my problem.

As i just started in this project, it doesn't matter other information was removed.

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