0

Final Class Yiisoft\Db\Pgsql\Expression\Int4RangeValue

InheritanceYiisoft\Db\Pgsql\Expression\Int4RangeValue
ImplementsYiisoft\Db\Expression\ExpressionInterface

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Db\Pgsql\Expression\Int4RangeValue
getBounds() Returns the lower and upper bounds of a range, inclusive. Yiisoft\Db\Pgsql\Expression\Int4RangeValue

Property Details

Hide inherited properties

$includeLower public property
public boolean $includeLower true
$includeUpper public property
public boolean $includeUpper true
$lower public property
public ?int $lower null
$upper public property
public ?int $upper null

Method Details

Hide inherited methods

__construct() public method

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,
) {}

            
getBounds() public method

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];
}