Example #1
0
 public static function debugCollection($collection, $glue = "\n", $label = NULL)
 {
     $ret = $label ? 'Collection ' . $label . $glue : NULL;
     if (count($collection) === 0) {
         $ret .= '[leere Collection]';
     } else {
         $ret .= \Webforge\Common\ArrayUtil::implode(Code::castArray($collection), $glue, function ($item, $key) {
             return sprintf('[%s] %s', $key, \Psc\Doctrine\Helper::debugEntity($item));
         });
     }
     return $ret;
 }