mqtt/Message.php
static public function Create($message_type, MQTT $mqtt)
    {
        if (!isset(Message::$name[$message_type])) {
            throw new Exception('Message type not defined');
        }

        $class = __NAMESPACE__ . '\\Message\\' . self::$name[$message_type];

        return new $class($mqtt);
    }
static public function Create($message_type, MQTT $mqtt)
    {
        if (!isset(Message::$name[$message_type])) {
            throw new Exception('Message type not defined');
        }

        $class = __NAMESPACE__ . '\\Message\\' . self::$name[$message_type];

        return new $class($mqtt);
    }
static public function Create ( $ message_type , MQTT $ mqtt ) { if ( ! isset ( Message :: $ name [ $ message_type ] ) ) { throw new Exception ( 'Message type not defined' ) ; } $ class = __NAMESPACE__ . '\\Message\\' . self :: $ name [ $ message_type ] ; return new $ class ( $ mqtt ) ; }
Create Message Object

@param int         $message_type
@param MQTT        $mqtt
@return mixed
@throws Exception
Create Message Object