phpbotgram

IntField extends BaseField
in package

FinalYes

Typed F-DSL wrapper for integer Telegram fields (`Message::$messageId`, `User::$id`, …). Provides the usual numeric comparators plus a convenience `between($lo, $hi)` helper that composes gte+lte under an `AndFilter` so users don't have to spell out the conjunction by hand.

Mirrors the design spec § "Magic-filter runtime + F-DSL" IntField 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: accept when `$lo <= $value <= $hi`. Composes two distinct chain operations under an `AndFilter` rather than a single op so the cascade can short-circuit on the lower bound and each child can be inspected independently by downstream tooling.
equals()  : Filter
Exact-equality comparator.
gt()  : Filter
Strict greater-than.
gte()  : Filter
Greater-than-or-equal.
in()  : Filter
Set-membership check across an int list. Method name follows the convention from `StringField::in` for consistency.
lt()  : Filter
Strict less-than.
lte()  : Filter
Less-than-or-equal.

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: accept when `$lo <= $value <= $hi`. Composes two distinct chain operations under an `AndFilter` rather than a single op so the cascade can short-circuit on the lower bound and each child can be inspected independently by downstream tooling.

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

equals()

Exact-equality comparator.

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

gt()

Strict greater-than.

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

gte()

Greater-than-or-equal.

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

in()

Set-membership check across an int list. Method name follows the convention from `StringField::in` for consistency.

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

lte()

Less-than-or-equal.

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

Search results