-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Message and Exception documentation
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
==================== | ||
Mosquitto\\Exception | ||
==================== | ||
|
||
This is an exception that may be thrown by many of the operations in the Client object. It does not add any features to the standard PHP `Exception` class. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ Contents | |
|
||
overview | ||
client | ||
message | ||
exception | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
================== | ||
Mosquitto\\Message | ||
================== | ||
|
||
.. php:namespace:: Mosquitto | ||
.. php:class:: Message | ||
Represents a message received from a broker. All data is represented as properties. | ||
|
||
.. php:attr:: $topic | ||
(*string*) The topic this message was delivered to. | ||
|
||
.. php:attr:: $payload | ||
(*string*) The payload of this message. | ||
|
||
.. php:attr:: $mid | ||
(*int*) The ID of this message. | ||
|
||
.. php:attr:: $qos | ||
(*int*) The QoS value applied to this message. | ||
|
||
.. php:attr:: $retain | ||
(*boolean*) Whether this is a retained message or not. | ||
|
||
This class has two static methods. | ||
|
||
.. php:staticmethod:: topicMatchesSub() | ||
Returns true if the supplied topic matches the supplied description, and otherwise false. | ||
|
||
:param string $topic: The topic to match | ||
:param string $subscription: The subscription to match | ||
|
||
.. php:staticmethod:: tokeniseTopic() | ||
Tokenise a topic or subscription string into an array of strings representing the topic hierarchy. | ||
|
||
:param string $topic: The topic to tokenise |