开发者

PHP/PEAR database-to-oop mapping engine?

last week I have spend on creating a dynamic DB-to-OOP mapping engine in PHP.

It works pretty well. You define your DB, make PHP classes with same names, call one method, it generates the SQL, fetches the result, and creates the appropriate objects from it.

You can apply different query filters, it automatically joins parent tables, translation tables (for multi-language db), value tables (which don't have classes on PHP side), it has a build-in filter validator (so only valid sql are passed to the db) etc. etc. etc.

It is nothing revolutionary, but with some careful table/class naming it gets the job done pretty well.

Later on, I opened my cPanel and had a look at PEAR modules, and I can see there are many modules that deal with databases. I'm new to PEAR, haven't used it before.

Can anyone tell me if there is a module th开发者_开发知识库at does something similar, like I described above?

Just to make things clear, I'm not looking for a proxy generator, which will generate the code for the classes, but a dynamic mapper, which does everything pretty much on-fly.


http://www.doctrine-project.org/ Is this what you're looking for? An ORM?


Pear::DB?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜