function SetLimits($offset, $limit, $max = 0, $cutoff = 0)
{
assert(is_int($offset));
assert(is_int($limit));
assert($offset >= 0);
assert($limit > 0);
assert($max >= 0);
$this->_offset = $offset;
$this->_limit = $limit;
if ($max > 0) {
$this->_maxmatches = $max;
}
if ($cutoff > 0) {
$this->_cutoff = $cutoff;
}
}