开发者

RedBean simple model

I've been told to开发者_如何转开发 use some ORM library to make storage easier. I've read about Doctrine, RedBeans and some other ones. I'm giving RedBeans a try because it's quite simple and requires no configuration. I already tried some basic code to store beans and so.

If I want to have a model class (a bean?), to add some basic behaviour and functions. What class do I need to extend? What methods do I need to override and then how should I get an instance of them?

Example: a Blog class which contains a User and Posts


The answer to my question was a feature of RedBean called 'Fuse'. It was as simple as extending RedBean_SimpleModel class and implementing delete and update methods. The downside of RedBean is the lack of tutorials/documentations (their wiki is really poor)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜