code/LivePubHelper.php
public static function wrap_set(array $list, $class = 'ViewableWrapper', $exclude=null, $exclude_field=null)
    {
        $set = new DataObjectSet();

        foreach ($list as $r) {
            $obj = self::wrap($r, $class);
            if ($exclude && in_array($obj->getField($exclude_field), $exclude)) {
                continue;
            }
            $set->push($obj);
        }

        return $set;
    }
public static function wrap_set(array $list, $class = 'ViewableWrapper', $exclude=null, $exclude_field=null)
    {
        $set = new DataObjectSet();

        foreach ($list as $r) {
            $obj = self::wrap($r, $class);
            if ($exclude && in_array($obj->getField($exclude_field), $exclude)) {
                continue;
            }
            $set->push($obj);
        }

        return $set;
    }
Takes an array of objects or arrays and creates a dataobjectset,
calling {@link LivePubHelper::wrap} on each item in the array.

@static
@param array $list
@param string $class [optional] - default is 'ViewableWrapper'
@param string $exclude [optional] - filter set by excluding these values
@param string $exclude_field [optional] - field to filter by
@return DataObjectSet