Přeskočit na hlavní obsah

Příspěvky

Zobrazují se příspěvky se štítkem hack

How to override (hack) location directories eg. Model in Zend Framework projects

Content At beginning Use Case Standart directory layout Specific directory layout Solvetion Summary At beginning This approach is bad but it is trivial and works. First I thought about a way how to inject/override by my implementation but if I stood before "I need only change location where objects will be generated..." Use Case For example - your project's 'models' directory has different structure and you must remove each generated model's php file to your specific directory. Standart directory layout If you use command "zf create model ItemModel" . ItemModel file will be generated by default in directory 'models' . ----models |--DbTable |--ItemModel.php Specific directory layout We want to generate model class in subdirectory 'Domain' . That's all. ----models |--DbTable |--Domain |--ItemModel.php Solvetion We must find directory '%ZF_HOME%\library\Zend\Tool\Project\Context\Zf\' . T...