public function setType($type)
    {
        if ($type === null) {
            $type = self::TYPE_UNDEFINED;
        }

        $this->type = $type;

        return $this;
    }
public function setType($type)
    {
        if ($type === null) {
            $type = self::TYPE_UNDEFINED;
        }

        $this->type = $type;

        return $this;
    }
public function setType ( $ type ) { if ( $ type === null ) { $ type = self :: TYPE_UNDEFINED ; } $ this -> type = $ type ; return $ this ; }
Sets message type.

@param string $type Message type.

@return self Returns self.
Sets message type .