public function addThreshold($threshold, $driver)
    {
        if (!is_int($threshold) || $threshold <= 0) {
            throw new InvalidArgumentException("The threshold '{$threshold}' is invalid. The threshold must be an integer and greater than '0'.");
        }

        $this->sortThresholds[$threshold] = $driver;
    }
public function addThreshold($threshold, $driver)
    {
        if (!is_int($threshold) || $threshold <= 0) {
            throw new InvalidArgumentException("The threshold '{$threshold}' is invalid. The threshold must be an integer and greater than '0'.");
        }

        $this->sortThresholds[$threshold] = $driver;
    }
public function addThreshold ( $ threshold , $ driver ) { if ( ! is_int ( $ threshold ) || $ threshold <= 0 ) { throw new InvalidArgumentException ( "The threshold '{$threshold}' is invalid. The threshold must be an integer and greater than '0'." ) ; } $ this -> sortThresholds [ $ threshold ] = $ driver ; }
Adds a new sorting algorithm with the specified threshold

@throws InvalidArgumentException if the $threshold is not an integer, or is not greater than 0

@param  int    $threshold The collection count threshold
@param  string $driver    The sorting driver to use at the threshold
Adds a new sorting algorithm with the specified threshold