From 0e3dc32f5d013ccff17fc5e41dc82dfbf9251946 Mon Sep 17 00:00:00 2001 From: Salman Zafar Date: Tue, 26 Feb 2019 17:47:19 +0500 Subject: [PATCH] change method name to ConnectAndPublish --- Readme.md | 4 ++-- src/MqttClass/Mqtt.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 9625bb9..98d6fa4 100644 --- a/Readme.md +++ b/Readme.md @@ -35,7 +35,7 @@ use Salman\Mqtt\MqttClass\Mqtt; public function SendMsgViaMqtt($topic, $message) { $mqtt = new Mqtt(); - $output = $mqtt->ConnectAndSendMessage($topic, $message); + $output = $mqtt->ConnectAndPublish($topic, $message); if ($output === true) { @@ -48,4 +48,4 @@ public function SendMsgViaMqtt($topic, $message) ### Tested on php 7.3 and laravel 5.7 -# Full documentation Coming Soon \ No newline at end of file +# Full documentation Coming Soon diff --git a/src/MqttClass/Mqtt.php b/src/MqttClass/Mqtt.php index 78a59f2..0b6beeb 100644 --- a/src/MqttClass/Mqtt.php +++ b/src/MqttClass/Mqtt.php @@ -30,7 +30,7 @@ class Mqtt } - public function ConnectAndSendMessage($topic, $msg) + public function ConnectAndPublish($topic, $msg) { $client = new phpMQTT($this->host,$this->port, rand(0,100), $this->cert_file, $this->debug); @@ -46,4 +46,5 @@ class Mqtt } + }