2023-06-28 15:50:38 +02:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace danog\MadelineProto\EventHandler;
|
|
|
|
|
2023-07-04 19:48:23 +02:00
|
|
|
use danog\MadelineProto\Ipc\IpcCapable;
|
2023-07-10 10:12:46 +02:00
|
|
|
use JsonSerializable;
|
2023-06-28 15:50:38 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a generic update.
|
|
|
|
*/
|
2023-07-10 10:12:46 +02:00
|
|
|
abstract class Update extends IpcCapable implements JsonSerializable
|
2023-06-28 15:50:38 +02:00
|
|
|
{
|
2023-07-10 10:12:46 +02:00
|
|
|
public function jsonSerialize(): mixed
|
|
|
|
{
|
|
|
|
$v = \get_object_vars($this);
|
|
|
|
unset($v['API'], $v['session']);
|
|
|
|
$v['_'] = static::class;
|
|
|
|
return $v;
|
|
|
|
}
|
2023-06-28 15:50:38 +02:00
|
|
|
}
|