gabordemooij / redbean

ORM layer that creates models, config and database on the fly
https://www.redbeanphp.com
2.31k stars 279 forks source link

Documentation of dispense #669

Closed marios88 closed 6 years ago

marios88 commented 6 years ago

https://redbeanphp.com/index.php?p=/crud

On the online documentation there is no mention of $alwaysReturnArray of R::dispense()

$twoBooks = R::dispense( 'book', 2 );

i think it should read (or something like that)

$twoBooks = R::dispense( 'book', 2 ); // Returns an array with [2] beans
$moreBooks = R::dispense( 'book', $i, TRUE ); // Always returns an array with [$i] beans even if $i=1
gabordemooij commented 6 years ago

updated thanks!