Class Symfony\Component\Finder\Comparator\NumberComparator

InheritanceSymfony\Component\Finder\Comparator\NumberComparator » Symfony\Component\Finder\Comparator\Comparator

NumberComparator compiles a simple comparison to an anonymous subroutine, which you can call with a value to be tested again.

Now this would be very pointless, if NumberCompare didn't understand magnitudes.

The target value may use magnitudes of kilobytes (k, ki), megabytes (m, mi), or gigabytes (g, gi). Those suffixed with an i use the appropriate 2**n version in accordance with the IEC standard:

Based on the Perl Number::Compare module.

See also

Method Details

__construct() public method


public void __construct ( $test )
$test string

A comparison string

throws InvalidArgumentException

If the test is not understood