redbean documention

45 views
Skip to first unread message

navid shokri

unread,
Jul 8, 2015, 9:15:05 AM7/8/15
to redbe...@googlegroups.com
i am using redbean for a few months and it is awesome. i never seen a good orm library such as this.
redbean has many good feature : it is handy , simple and power full and any one how try this library 
cannot chose another library. but why documention of this is so brief and advance feature are uncovered . 
how can we help providers to create a better and more detail documentation for this library? and is there a 
good e-book reference for more detail info on it?  

gabor

unread,
Jul 10, 2015, 5:35:34 PM7/10/15
to redbe...@googlegroups.com, navid...@gmail.com


Hi there,

I would not use the bindFunc functions, they are not meant for these kind of things.
I recommend to use a FUSE model.

Just add a class named Model_Person (extends SimpleModel) docs: http://www.redbeanphp.com/models
Now add a method called getDisplayName() or something, inside this method you do something like:

public function getDisplayName() {
   
return $this->bean->firstName . ' ' . $this->bean->lastName;
}

Now you can do this:

$person = R::load('person', $id);
echo $person
->getDisplayName();

and it will show the full name...

Hope this helps, cheers
Gabor
Reply all
Reply to author
Forward
Message has been deleted
0 new messages