# BaseRange Class Reference
[Common wrapper and helper classes]

Numeric interval implementation and accompanying utility methods. More...

Inheritance diagram for BaseRange:
[legend]

List of all members.

## Public Member Functions

| __construct ($min=null, $max=null)
| getMin ()
| setMin ($min=null)
| getMax ()
| setMax ($max=null)
| toString ($from= 'от', $to= 'до')
| atavism wrt BC
| divide ($factor, $precision=null)
| multiply ($multiplier)
| equals (BaseRange $range)
| intersects (BaseRange $range)
| isEmpty ()

## Static Public Member Functions

static | lazyCreate ($min=null, $max=null)
static | swap (&$a, &$b)

## Protected Attributes

| $min = null
| $max = null

## Detailed Description

Numeric interval implementation and accompanying utility methods.

Definition at line 17 of file BaseRange.class.php.

## Constructor & Destructor Documentation

BaseRange::__construct | ( | $ | min = `null`,
|  | $ | max = `null` |
| ) |  |  |

Reimplemented in FloatRange, and Range.

Definition at line 22 of file BaseRange.class.php.

References $max, and $min.

## Member Function Documentation

BaseRange::divide | ( | $ | factor,
|  | $ | precision = `null` |
| ) |  |  |

Returns:
  BaseRange

Definition at line 98 of file BaseRange.class.php.

BaseRange::equals | ( | BaseRange $ | range | ) |

Definition at line 123 of file BaseRange.class.php.

References getMax(), and getMin().

Here is the call graph for this function:

BaseRange::getMax | ( |  | ) |

Definition at line 60 of file BaseRange.class.php.

Referenced by PrimitiveRange::checkLimits(), IntegerSet::contains(), equals(), and intersects().

BaseRange::getMin | ( |  | ) |

Definition at line 39 of file BaseRange.class.php.

Referenced by PrimitiveRange::checkLimits(), IntegerSet::contains(), equals(), and intersects().

BaseRange::intersects | ( | BaseRange $ | range | ) |

Definition at line 129 of file BaseRange.class.php.

References getMax(), and getMin().

Here is the call graph for this function:

BaseRange::isEmpty | ( |  | ) |

Definition at line 135 of file BaseRange.class.php.

static BaseRange::lazyCreate | ( | $ | min = `null`,
|  | $ | max = `null` |
| ) |  |  | `[static]`

Returns:
  BaseRange

Definition at line 31 of file BaseRange.class.php.

References $max, $min, and swap().

Referenced by PrimitiveRange::importMarried(), and PrimitiveRange::importSingle().

Here is the call graph for this function:

BaseRange::multiply | ( | $ | multiplier | ) |

Returns:
  BaseRange

Definition at line 112 of file BaseRange.class.php.

BaseRange::setMax | ( | $ | max = `null` | ) |

Exceptions:

  | WrongArgumentException |

Returns:
  BaseRange

Reimplemented in FloatRange, and Range.

Definition at line 69 of file BaseRange.class.php.

References $max.

BaseRange::setMin | ( | $ | min = `null` | ) |

Exceptions:

  | WrongArgumentException |

Returns:
  BaseRange

Reimplemented in FloatRange, and Range.

Definition at line 48 of file BaseRange.class.php.

References $min.

static BaseRange::swap | ( | &$ | a,
|  | &$ | b |
| ) |  |  | `[static]`

Definition at line 142 of file BaseRange.class.php.

Referenced by lazyCreate().

BaseRange::toString | ( | $ | from = `'от'`,
|  | $ | to = `'до'` |
| ) |  |  |

atavism wrt BC

Definition at line 82 of file BaseRange.class.php.

## Member Data Documentation

BaseRange::$max = null`[protected]`

Definition at line 20 of file BaseRange.class.php.

Referenced by Range::__construct(), FloatRange::__construct(), __construct(), Range::create(), IntegerSet::create(), FloatRange::create(), lazyCreate(), Range::setMax(), FloatRange::setMax(), and setMax().

BaseRange::$min = null`[protected]`

Definition at line 19 of file BaseRange.class.php.

Referenced by Range::__construct(), FloatRange::__construct(), __construct(), Range::create(), IntegerSet::create(), FloatRange::create(), lazyCreate(), Range::setMin(), FloatRange::setMin(), and setMin().

The documentation for this class was generated from the following file:

- main/Base/BaseRange.class.php