I have seen many articles about integrating ZF and Doctrine. There is also a suggestion for ZF here , but they always have two possible structures. Either they put all the models in one top-level model catalog, or put it in the catalog associated with the module.
application
| - Bootstrap.php
| - configs
| - controllers
| - models - EITHER HERE
| - modules
| - examplemodule
| | - controllers
| | - models - OR HERE
| | - views
| - views
For our projects, I see problems for one of two options:
1. One directory: application / models - in a complex system in a short time there will be hundreds of files, in all cases when you have two table classes (for example, User.php and UserTable .php).
2. Module-based model catalogs: application / modules / examplemodule / models - in many cases we use models in several modules at the same time. Therefore, a "User" is required, for example. in the modules "game", "administration", ...
Is there a way to use some subdirectories under the top level directory of the “model” to get some grouping. It must be completely independent of the structure of the module.
application
| - Bootstrap.php
...
| - models
| - user
| | - User.php
| |-- Friend.php
| |-- other user related models
| -- game
| |-- Game.php
| |-- Score.php
| |-- ...
...
yaml.
, ? !