This is an outdated version of the Manual. Visit the NEW Manual

Labels

A Label is a bean with just a name property. You can generate a batch of labels of a certain type using:


    $labels 
R::dispenseLabels('meals'
        array(
'pizza''pasta''hamburger')
    );

This will create three meal objects. Each bean will have a name property that corresponds to one of the strings mentioned in the comma separated list.

You can also collect the strings from label beans using:


    $array 
R::gatherLabels($meals);

The gatherLabels() function returns an alphabetically sorted array of strings each containing one name property of a bean in the bean list provided.


 
 

RedBeanPHP Easy ORM for PHP © 2014 Gabor de Mooij and the RedBeanPHP community - Licensed New BSD/GPLv2