Example #1
0
 public static function exportAll($beans, $recursively = false)
 {
     if ($recursively) {
         if (!self::$exporter) {
             self::$exporter = new RedBean_Plugin_BeanExport(self::$toolbox);
             self::$exporter->loadSchema();
         }
         return self::$exporter->export($beans);
     } else {
         $array = array();
         foreach ($beans as $bean) {
             if ($bean instanceof RedBean_OODBBean) {
                 $array[] = $bean->export();
             }
         }
         return $array;
     }
 }