MadelineProtoDocs/docs/PHP/danog/MadelineProto/MTProtoTools/UpdatesState.md

2.0 KiB

title: danog\MadelineProto\MTProtoTools\UpdatesState: Stores the state of updates. description:

danog\MadelineProto\MTProtoTools\UpdatesState

Back to index

Author: Daniil Gentili daniil@daniil.it

Stores the state of updates.


Generated by danog/phpdoc.

Method list:

  • isChannel(): bool
  • getChannel(): int
  • syncLoading(bool|null $set): bool
  • update(array $init): self
  • pts(int $set): \int PTS
  • qts(int $set): \int QTS
  • seq(int $set): \int seq
  • date(int $set): \int Date
  • checkPts(array $update): \int -1 if it's too old, 0 if it's ok, 1 if it's too new
  • checkSeq(int $seq): \int -1 if it's too old, 0 if it's ok, 1 if it's too new

Methods:

isChannel(): bool

Is this state relative to a channel?

getChannel(): int

Get the channel ID.

syncLoading(bool|null $set): bool

Are we currently busy?

Parameters:

  • $set: bool|null Update the currently busy flag

update(array $init): self

Update multiple parameters.

Parameters:

  • $init: array Parameters to update

pts(int $set): \int PTS

Get/set PTS.

Parameters:

  • $set: int PTS to set

Return value: PTS

qts(int $set): \int QTS

Get/set QTS.

Parameters:

  • $set: int QTS to set

Return value: QTS

seq(int $set): \int seq

Get/set seq.

Parameters:

  • $set: int Seq to set

Return value: seq

date(int $set): \int Date

Get/set date.

Parameters:

  • $set: int Date to set

Return value: Date

checkPts(array $update): \int -1 if it's too old, 0 if it's ok, 1 if it's too new

Check validity of PTS contained in update.

Parameters:

  • $update: array Update

Return value: -1 if it's too old, 0 if it's ok, 1 if it's too new

checkSeq(int $seq): \int -1 if it's too old, 0 if it's ok, 1 if it's too new

Check validity of seq contained in update.

Parameters:

  • $seq: int Seq

Return value: -1 if it's too old, 0 if it's ok, 1 if it's too new