I'm building a custom MVC framework partially based on CakePHP and using RedBeanPHP.
Now I'm in the part of creating the DB CRUD. Here's my idea:
class Model extends RedBean_SimpleModel {
}
class Product extends Model {
var $beans = array(
'name',
'price',
...
);
}
This seems a good way to make RedBeanPHP generate the table "Products" and columns on the fly.
Now my current doubt (since I'm starting to work and understand RedBeanPHP) problem is the associations.
I really like the CakePHP's method, with "hasOne", "hasMany", "belongsTo", etc.
Can someone guide me to a way of doing that but with RedBeanPHP?