Final Class Yiisoft\Db\Pgsql\Expression\TsRangeValue
| Inheritance | Yiisoft\Db\Pgsql\Expression\TsRangeValue |
|---|---|
| Implements | Yiisoft\Db\Expression\ExpressionInterface |
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $includeLower | boolean | Yiisoft\Db\Pgsql\Expression\TsRangeValue | |
| $includeUpper | boolean | Yiisoft\Db\Pgsql\Expression\TsRangeValue | |
| $lower | ?\DateTimeImmutable | Yiisoft\Db\Pgsql\Expression\TsRangeValue | |
| $upper | ?\DateTimeImmutable | Yiisoft\Db\Pgsql\Expression\TsRangeValue |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Db\Pgsql\Expression\TsRangeValue | |
| getBounds() | Returns the lower and upper bounds of a range, inclusive. | Yiisoft\Db\Pgsql\Expression\TsRangeValue |
Property Details
Method Details
| public mixed __construct ( ?\DateTimeImmutable $lower = null, ?\DateTimeImmutable $upper = null, boolean $includeLower = true, boolean $includeUpper = true ) | ||
| $lower | ?\DateTimeImmutable | |
| $upper | ?\DateTimeImmutable | |
| $includeLower | boolean | |
| $includeUpper | boolean | |
public function __construct(
public readonly ?DateTimeImmutable $lower = null,
public readonly ?DateTimeImmutable $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->modify('+1 second');
$upper = $this->upper === null || $this->includeUpper
? $this->upper
: $this->upper->modify('-1 second');
return [$lower, $upper];
}
Signup or Login in order to comment.