Final Class Yiisoft\Db\Pgsql\Expression\Int4RangeValue
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $includeLower | boolean | Yiisoft\ |
|
| $includeUpper | boolean | Yiisoft\ |
|
| $lower | ?int | Yiisoft\ |
|
| $upper | ?int | Yiisoft\ |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| getBounds() | Returns the lower and upper bounds of a range, inclusive. | Yiisoft\ |
Property Details
Method Details
| public mixed __construct ( ?int $lower = null, ?int $upper = null, boolean $includeLower = true, boolean $includeUpper = true ) | ||
| $lower | ?int | |
| $upper | ?int | |
| $includeLower | boolean | |
| $includeUpper | boolean | |
public function __construct(
public readonly ?int $lower = null,
public readonly ?int $upper = null,
public readonly bool $includeLower = true,
public readonly bool $includeUpper = true,
) {}
Returns the lower and upper bounds of a range, inclusive.
| public array getBounds ( ) |
public function getBounds(): array
{
$lower = $this->lower === null || $this->includeLower
? $this->lower
: $this->lower + 1;
$upper = $this->upper === null || $this->includeUpper
? $this->upper
: $this->upper - 1;
return [$lower, $upper];
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.