phpbotgram

NullableIntField extends BaseField
in package

FinalYes

Typed F-DSL wrapper for nullable int fields (`?int` — e.g.

Message::$messageThreadId, User::$senderBoostCount). Mirrors the IntField comparator surface and adds isSet / isNull presence tests.

Mirrors the design spec § "Magic-filter runtime + F-DSL" NullableIntField surface.

Table of Contents

Properties

$chain  : MagicFilter

Methods

__construct()  : mixed
Hold the chain handle directly: codegen passes a freshly-rooted chain (e.g. `MagicFilter::root()->text`) and subclass methods clone-and- extend it via the chain's immutable append semantics.
asFilter()  : Filter
Bridge the wrapped chain to a `Filter`. Used by callers that want the raw chain verdict without going through a typed comparator — e.g. an existence check on a nullable-typed field where the underlying `MagicFilter::asFilter()` reject-on-null behaviour is exactly what the user wants.
between()  : Filter
Inclusive range check. Reject when the field is null. Same gte+lte composition under an AndFilter as IntField::between.
equals()  : Filter
Exact-match comparator. Reject when the field is null.
gt()  : Filter
Strict greater-than. Reject when the field is null.
gte()  : Filter
Greater-than-or-equal. Reject when the field is null.
in()  : Filter
Set-membership across an int list. Reject when the field is null.
isNull()  : Filter
Accept when the field is null.
isSet()  : Filter
Accept when the field is non-null.
lt()  : Filter
Strict less-than. Reject when the field is null.
lte()  : Filter
Less-than-or-equal. Reject when the field is null.

Properties

Methods

__construct()

Hold the chain handle directly: codegen passes a freshly-rooted chain (e.g. `MagicFilter::root()->text`) and subclass methods clone-and- extend it via the chain's immutable append semantics.

public __construct(MagicFilter $chain) : mixed
Parameters
$chain : MagicFilter

asFilter()

Bridge the wrapped chain to a `Filter`. Used by callers that want the raw chain verdict without going through a typed comparator — e.g. an existence check on a nullable-typed field where the underlying `MagicFilter::asFilter()` reject-on-null behaviour is exactly what the user wants.

public asFilter() : Filter

Returns a MagicFilterAsFilter instance under the hood; see MagicFilterAsFilter for the bool|array acceptance contract.

Return values
Filter

between()

Inclusive range check. Reject when the field is null. Same gte+lte composition under an AndFilter as IntField::between.

public between(int $lo, int $hi) : Filter
Parameters
$lo : int
$hi : int
Return values
Filter

equals()

Exact-match comparator. Reject when the field is null.

public equals(int $value) : Filter
Parameters
$value : int
Return values
Filter

gt()

Strict greater-than. Reject when the field is null.

public gt(int $value) : Filter
Parameters
$value : int
Return values
Filter

gte()

Greater-than-or-equal. Reject when the field is null.

public gte(int $value) : Filter
Parameters
$value : int
Return values
Filter

in()

Set-membership across an int list. Reject when the field is null.

public in(array<int, int> $values) : Filter
Parameters
$values : array<int, int>
Return values
Filter

lte()

Less-than-or-equal. Reject when the field is null.

public lte(int $value) : Filter
Parameters
$value : int
Return values
Filter
On this page

Search results