Skip to content

Rename the remaining MQTTClient* to MqttClient* #18

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A very basic publish example requires only three steps: connect, publish and clo
```php
$clientId = 'test-publisher';

$mqtt = new MQTTClient($server, $port, $clientId);
$mqtt = new MqttClient($server, $port, $clientId);
$mqtt->connect();
$mqtt->publish('php-mqtt/client/test', 'Hello World!', 0);
$mqtt->close();
Expand All @@ -40,7 +40,7 @@ Subscribing is a little more complex than publishing as it requires to run an ev
```php
$clientId = 'test-subscriber';

$mqtt = new MQTTClient($server, $port, $clientId);
$mqtt = new MqttClient($server, $port, $clientId);
$mqtt->connect();
$mqtt->subscribe('php-mqtt/client/test', function ($topic, $message) {
echo sprintf("Received message on topic [%s]: %s\n", $topic, $message);
Expand All @@ -56,7 +56,7 @@ pcntl_async_signals(true);

$clientId = 'test-subscriber';

$mqtt = new MQTTClient($server, $port, $clientId);
$mqtt = new MqttClient($server, $port, $clientId);
pcntl_signal(SIGINT, function (int $signal, $info) use ($mqtt) {
$mqtt->interrupt();
});
Expand Down
4 changes: 2 additions & 2 deletions src/Concerns/OffersHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function initializeEventHandlers(): void
* Example:
* ```php
* $mqtt->registerLoopEventHandler(function (
* MQTTClient $mqtt,
* MqttClient $mqtt,
* float $elapsedTime
* ) use ($logger) {
* $logger->info("Running for [{$elapsedTime}] seconds already.");
Expand Down Expand Up @@ -95,7 +95,7 @@ public function unregisterLoopEventHandler(\Closure $callback = null): MqttClien
* Example:
* ```php
* $mqtt->registerPublishEventHandler(function (
* MQTTClient $mqtt,
* MqttClient $mqtt,
* string $topic,
* string $message,
* int $messageId,
Expand Down
4 changes: 2 additions & 2 deletions src/Contracts/MqttClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function getClientId(): string;
* Example:
* ```php
* $mqtt->registerLoopEventHandler(function (
* MQTTClient $mqtt,
* MqttClient $mqtt,
* float $elapsedTime
* ) use ($logger) {
* $logger->info("Running for [{$elapsedTime}] seconds already.");
Expand Down Expand Up @@ -193,7 +193,7 @@ public function unregisterLoopEventHandler(\Closure $callback = null): MqttClien
* Example:
* ```php
* $mqtt->registerPublishEventHandler(function (
* MQTTClient $mqtt,
* MqttClient $mqtt,
* string $topic,
* string $message,
* int $messageId,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ConnectingToBrokerFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Exception to be thrown if an MQTT client could not connect to the broker.
*/
class ConnectingToBrokerFailedException extends MQTTClientException
class ConnectingToBrokerFailedException extends MqttClientException
{
public function __construct(int $code, string $error)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/DataTransferException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Exception to be thrown if an MQTT client encountered an error while transfering data.
*/
class DataTransferException extends MQTTClientException
class DataTransferException extends MqttClientException
{
public function __construct(int $code, string $error)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Exception to be thrown if an MQTT client error occurs.
*/
class MQTTClientException extends \Exception
class MqttClientException extends \Exception
{
public function __construct(string $message = '', int $code = 0, \Throwable $parentException = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Exception to be thrown if a publish message with QoS level 2 is received and a
* publish receive message has already been sent, but a publish confirmation is pending.
*/
class PendingPublishConfirmationAlreadyExistsException extends MQTTClientException
class PendingPublishConfirmationAlreadyExistsException extends MqttClientException
{
public function __construct(int $messageId)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/UnexpectedAcknowledgementException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Exception to be thrown if an MQTT client encountered an unexpected acknowledgement.
*/
class UnexpectedAcknowledgementException extends MQTTClientException
class UnexpectedAcknowledgementException extends MqttClientException
{
public function __construct(int $code, string $error)
{
Expand Down