phpbotgram

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

$id  : int
$photoUrl  : string|null
$title  : string
$type  : string
$username  : string|null

Methods

__construct()  : mixed
fromArray()  : self
Construct from a raw JSON-decoded assoc array.

Properties

$photoUrl read-only

public string|null $photoUrl = null

$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>
Return values
self
On this page

Search results