phpbotgram

F

Table of Contents

Classes

BaseField
Abstract base for the typed F-DSL field wrappers. Each subclass binds a `MagicFilter` chain to a narrowly-typed comparator surface — `StringField` exposes string predicates, `IntField` exposes numeric ones, and so on — so call sites get IDE autocomplete and PHPStan-checked parameters without users having to drop into the raw chain API.
BoolField
Typed F-DSL wrapper for boolean Telegram fields (`User::$isPremium`, `Message::$isTopicMessage`, …). Surfaces only the two truth-value comparators so call sites read as `MessageF::isTopicMessage()->isTrue()` rather than `equals(true)`.
DateTimeField
Typed F-DSL wrapper for `\DateTime`-valued Telegram fields (`Message::$date`, `Message::$editDate`, …). The temporal helpers delegate to MagicFilter's numeric comparators, which use PHP's native `<`/`>`-on-DateTime semantics — DateTime instances compare by their canonical timestamp.
IntField
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.
NullableIntField
Typed F-DSL wrapper for nullable int fields (`?int` — e.g.
NullableObjectField
Typed F-DSL wrapper for nullable nested-object fields (`?User`, `?Message`, …). Only exposes presence-tests because deeper predicates are object-type-specific and belong on per-type sub-builders emitted by codegen (`MessageF::fromUser()` → `NullableObjectField`).
NullableStringField
Typed F-DSL wrapper for nullable string fields (`?string` — most of the optional text fields on `Message`, `User`, …). Mirrors the `StringField` comparator surface and adds two presence-tests (`isSet` / `isNull`) so callers can express null-checks without dropping into raw MagicFilter.
RegexField
Typed F-DSL wrapper for PCRE-pattern matching over a string-valued chain. The match operation reads the running string off the chain, runs `preg_match` against it, and either rejects (no match) or accepts — optionally injecting the match payload as kwargs.
StringField
Typed F-DSL wrapper for string-valued Telegram fields (e.g.
On this page

Search results