NullableIntField
extends BaseField
in package
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
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
$chain read-only
public
MagicFilter
$chain
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
Filterbetween()
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
Filterequals()
Exact-match comparator. Reject when the field is null.
public
equals(int $value) : Filter
Parameters
- $value : int
Return values
Filtergt()
Strict greater-than. Reject when the field is null.
public
gt(int $value) : Filter
Parameters
- $value : int
Return values
Filtergte()
Greater-than-or-equal. Reject when the field is null.
public
gte(int $value) : Filter
Parameters
- $value : int
Return values
Filterin()
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
FilterisNull()
Accept when the field is null.
public
isNull() : Filter
Return values
FilterisSet()
Accept when the field is non-null.
public
isSet() : Filter
Return values
Filterlt()
Strict less-than. Reject when the field is null.
public
lt(int $value) : Filter
Parameters
- $value : int
Return values
Filterlte()
Less-than-or-equal. Reject when the field is null.
public
lte(int $value) : Filter
Parameters
- $value : int