public function chunk($chunkSize, callable $callback)
    {
        while (true) {
            $results = $this->getAll([], $chunkSize, false);

            if (!$results->isEmpty()) {
                if (call_user_func($callback, $results) === false) {
                    return false;
                }
            }

            if (empty($this->lastEvaluatedKey)) {
                break;
            }
        }

        return true;
    }
public function chunk($chunkSize, callable $callback)
    {
        while (true) {
            $results = $this->getAll([], $chunkSize, false);

            if (!$results->isEmpty()) {
                if (call_user_func($callback, $results) === false) {
                    return false;
                }
            }

            if (empty($this->lastEvaluatedKey)) {
                break;
            }
        }

        return true;
    }
public function chunk ( $ chunkSize , callable $ callback ) { while ( true ) { $ results = $ this -> getAll ( [ ] , $ chunkSize , false ) ; if ( ! $ results -> isEmpty ( ) ) { if ( call_user_func ( $ callback , $ results ) === false ) { return false ; } } if ( empty ( $ this -> lastEvaluatedKey ) ) { break ; } } return true ; }
Implements the Query Chunk method

@param int $chunkSize
@param callable $callback
Implements the Query Chunk method