add connection manager and facade with implementation

This commit is contained in:
Namoshek
2019-09-15 21:41:06 +02:00
parent c0bc99c781
commit ca2238c9b5
6 changed files with 285 additions and 33 deletions

30
src/Facades/MQTT.php Normal file
View 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;
}
}