WebAppChat
in package
FinalYes
Represents the chat object embedded in WebApp init data.
Minimal hand-rolled DTO mirroring the chat field of WebAppInitData.
Fields match the Telegram Bot API WebAppChat spec.
Table of Contents
Properties
Methods
- __construct() : mixed
- fromArray() : self
- Construct from a raw JSON-decoded assoc array.
Properties
$id read-only
public
int
$id
$photoUrl read-only
public
string|null
$photoUrl
= null
$title read-only
public
string
$title
$type read-only
public
string
$type
$username read-only
public
string|null
$username
= null
Methods
__construct()
public
__construct(int $id, string $type, string $title[, string|null $username = null ][, string|null $photoUrl = null ]) : mixed
Parameters
- $id : int
- $type : string
- $title : string
- $username : string|null = null
- $photoUrl : string|null = null
fromArray()
Construct from a raw JSON-decoded assoc array.
public
static fromArray(array<string, mixed> $data) : self
Parameters
- $data : array<string, mixed>