Poll
class Poll (View source)
Properties
| protected int|null | $lastSeenUid | The last seen message UID. |
Methods
__destruct()
Destructor.
void
start(callable $callback, callable $query)
Poll for new messages at a given frequency.
void
check(callable $callback, callable $query)
Check for new messages since the last seen UID.
folder()
Get the folder to poll.
void
reconnect()
Reconnect the client and restart the poll session.
void
connect()
Connect the client and select the folder to poll.
void
disconnect()
Disconnect the client.
int|false
getNextFrequency()
Get the next frequency in seconds.
Details
__destruct()
Destructor.
void
start(callable $callback, callable $query)
Poll for new messages at a given frequency.
protected void
check(callable $callback, callable $query)
Check for new messages since the last seen UID.
protected FolderInterface
folder()
Get the folder to poll.
protected void
reconnect()
Reconnect the client and restart the poll session.
protected void
connect()
Connect the client and select the folder to poll.
protected void
disconnect()
Disconnect the client.
protected int|false
getNextFrequency()
Get the next frequency in seconds.