phpbotgram

SceneConfig
in package

Read onlyYes
FinalYes

Immutable configuration record for a single scene class.

Mirrors SceneConfig (aiogram/fsm/scene.py:186-205):

Tags
dataclass

class SceneConfig: state: str | None handlers: list[HandlerContainer] actions: dict[SceneAction, dict[str, CallableObject]] reset_data_on_enter: bool | None = None reset_history_on_enter: bool | None = None callback_query_without_state: bool | None = None


The `attrs_resolver` field from upstream is a Python-specific class
introspection helper; it has no equivalent in the PHP port (the PHP
attribute system is used instead) and is therefore omitted.

Table of Contents

Properties

$actions  : array<string, array<string, callable>>
$callbackQueryWithoutState  : bool|null
$handlers  : array<int, HandlerContainer>
$resetDataOnEnter  : bool|null
$resetHistoryOnEnter  : bool|null
$state  : string|null

Methods

__construct()  : mixed

Properties

$actions

public array<string, array<string, callable>> $actions

$callbackQueryWithoutState

public bool|null $callbackQueryWithoutState = null

$resetDataOnEnter

public bool|null $resetDataOnEnter = null

$resetHistoryOnEnter

public bool|null $resetHistoryOnEnter = null

Methods

__construct()

public __construct(string|null $state, array<int, HandlerContainer$handlers, array<string, array<string, callable>> $actions[, bool|null $resetDataOnEnter = null ][, bool|null $resetHistoryOnEnter = null ][, bool|null $callbackQueryWithoutState = null ]) : mixed
Parameters
$state : string|null

The FSM state name for this scene, or null.

$handlers : array<int, HandlerContainer>

All registered handler containers.

$actions : array<string, array<string, callable>>

Lifecycle action handlers keyed first by SceneAction case name (e.g. 'Enter'), then by the Telegram update-type string (e.g. 'message'), with a callable as the leaf value.

$resetDataOnEnter : bool|null = null

When true, FSM data is cleared on enter.

$resetHistoryOnEnter : bool|null = null

When true, scene history is cleared on enter.

$callbackQueryWithoutState : bool|null = null

Allow callback_query without state.

On this page

Search results