Example #1
0
 public function __construct($address, $clientid = null, LoggerInterface $logger = null)
 {
     $this->address = $address;
     # check client id
     (new CheckClientID())->check($clientid);
     $this->clientid = $clientid;
     if (null === $logger) {
         $this->logger = new NullLogger();
     } else {
         $this->logger = $logger;
         spMQTTDebug::setLogger($logger);
     }
 }