public static function destroyAll(array $objects, $useMasterKey = false)
    {
        $errors = [];
        $count = count($objects);
        if ($count)
        {
            $batchSize = 40;
            $processed = 0;
            $currentBatch = [];
            $currentcount = 0;
            while ($processed < $count)
            {
                $currentcount++;
                $currentBatch[] = $objects[$processed++];
                if ($currentcount == $batchSize || $processed == $count)
                {
                    $results = static::destroyBatch($currentBatch);
                    $errors = array_merge($errors, $results);
                    $currentBatch = [];
                    $currentcount = 0;
                }
            }
            if (count($errors))
            {
                throw new AVAggregateException("Errors during batch destroy.", $errors);
            }
        }

        return null;
    }
public static function destroyAll(array $objects, $useMasterKey = false)
    {
        $errors = [];
        $count = count($objects);
        if ($count)
        {
            $batchSize = 40;
            $processed = 0;
            $currentBatch = [];
            $currentcount = 0;
            while ($processed < $count)
            {
                $currentcount++;
                $currentBatch[] = $objects[$processed++];
                if ($currentcount == $batchSize || $processed == $count)
                {
                    $results = static::destroyBatch($currentBatch);
                    $errors = array_merge($errors, $results);
                    $currentBatch = [];
                    $currentcount = 0;
                }
            }
            if (count($errors))
            {
                throw new AVAggregateException("Errors during batch destroy.", $errors);
            }
        }

        return null;
    }
public static function destroyAll ( array $ objects , $ useMasterKey = false ) { $ errors = [ ] ; $ count = count ( $ objects ) ; if ( $ count ) { $ batchSize = 40 ; $ processed = 0 ; $ currentBatch = [ ] ; $ currentcount = 0 ; while ( $ processed < $ count ) { $ currentcount ++ ; $ currentBatch [ ] = $ objects [ $ processed ++ ] ; if ( $ currentcount == $ batchSize || $ processed == $ count ) { $ results = static :: destroyBatch ( $ currentBatch ) ; $ errors = array_merge ( $ errors , $ results ) ; $ currentBatch = [ ] ; $ currentcount = 0 ; } } if ( count ( $ errors ) ) { throw new AVAggregateException ( "Errors during batch destroy." , $ errors ) ; } } return null ; }
Delete an array of objects.

@param array $objects Objects to destroy.
@param boolean $useMasterKey Whether to use the master key or not.

@throws AVAggregateException
@return null
Delete an array of objects .