public static function range($class, Enum $from, Enum $to) {
			if (!EnumUtil::isEnumClass($class))
				throw new InvalidArgumentException($class .
					' is not loaded or does not extend DaybreakStudios\Common\Enum\Enum.');
			else if (!EnumUtil::isEnum($from, $class) || !EnumUtil::isEnum($to, $class))
				throw new InvalidArgumentException(sprintf('$from and $to must be an instance of %s.', $this->class));

			$values = array();

			foreach ($class::values() as $v)
				if ($v->ordinal() >= $from->ordinal() && $v->ordinal() <= $to->ordinal())
					$values[] = $v;

			return new EnumSet($class, $values);
		}
public static function range($class, Enum $from, Enum $to) {
			if (!EnumUtil::isEnumClass($class))
				throw new InvalidArgumentException($class .
					' is not loaded or does not extend DaybreakStudios\Common\Enum\Enum.');
			else if (!EnumUtil::isEnum($from, $class) || !EnumUtil::isEnum($to, $class))
				throw new InvalidArgumentException(sprintf('$from and $to must be an instance of %s.', $this->class));

			$values = array();

			foreach ($class::values() as $v)
				if ($v->ordinal() >= $from->ordinal() && $v->ordinal() <= $to->ordinal())
					$values[] = $v;

			return new EnumSet($class, $values);
		}
public static function range ( $ class , Enum $ from , Enum $ to ) { if ( ! EnumUtil :: isEnumClass ( $ class ) ) throw new InvalidArgumentException ( $ class . ' is not loaded or does not extend DaybreakStudios\Common\Enum\Enum.' ) ; else if ( ! EnumUtil :: isEnum ( $ from , $ class ) || ! EnumUtil :: isEnum ( $ to , $ class ) ) throw new InvalidArgumentException ( sprintf ( '$from and $to must be an instance of %s.' , $ this -> class ) ) ; $ values = array ( ) ; foreach ( $ class :: values ( ) as $ v ) if ( $ v -> ordinal ( ) >= $ from -> ordinal ( ) && $ v -> ordinal ( ) <= $ to -> ordinal ( ) ) $ values [ ] = $ v ; return new EnumSet ( $ class , $ values ) ; }
Creates an EnumSet that initially contains all of the elements between two endpoints.

@throws InvalidArgumentException if either of the range endpoints are not enums, or they are not elements
from the same enum

@param  string $class the fully-qualified namespace of the num
@param  Enum   $from  the start point of the range
@param  Enum   $to    the end point of the range
@return EnumSet       the resulting EnumSet
Creates an EnumSet that initially contains all of the elements between two endpoints .