add connection manager and facade with implementation
This commit is contained in:
30
src/Facades/MQTT.php
Normal file
30
src/Facades/MQTT.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMqtt\Client\Facades;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use PhpMqtt\Client\ConnectionManager;
|
||||
use PhpMqtt\Client\MQTTClient;
|
||||
|
||||
/**
|
||||
* @method static MQTTClient connection(string $name = null)
|
||||
* @method static void close(string $connection = null)
|
||||
* @method static void publish(string $topic, string $message, string $connection = null)
|
||||
*
|
||||
* @see ConnectionManager
|
||||
* @package PhpMqtt\Client\Facades
|
||||
*/
|
||||
class MQTT extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected static function getFacadeAccessor()
|
||||
{
|
||||
return ConnectionManager::class;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user