开发者

PHP Propel-gen to zend framework naming convention

I am playing with the build settings in my buil开发者_运维百科d.properties file for propel (version 1.5.4) but don't get it right.

Example: Table News should have

  • class Model_News in ./Model/News.php
  • class Model_Base_News in ./Model/Base/News.php

My main problems:

  • propel adds the project name as a folder between Model and News.php like: /Model/project/News.php
  • propel adds the propel.classPrefix to the file, too. So propel.classPrefix = Model_ builds class Model_News inside /Model/project/Model_News.php

aaaaaaaaaaaahhhh :-(


I don't think you can customize the paths to this form by only using build.properties. You probably need to overload the OMBuilder::getClassFilePath() (used by PropelOMTask::build()) function in your own custom build classes. Unfortunately you cannot just override the OMBuilder class, but you must create subclasses for all *Builder classes.


Personally, I'd stick with the Propel conventions and just use the Propel autoloader for Propel classes. Not as clean as your intended solution, perhaps, but I'd not reject an ORM just on the basis of its internal file naming.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜