public function createMessage(array $data = [])
    {
        /** @var Message $className */
        $className = $this->className;
        if (empty($data)) {
            return $className::create();
        }

        return $className::fromArray($data);
    }
public function createMessage(array $data = [])
    {
        /** @var Message $className */
        $className = $this->className;
        if (empty($data)) {
            return $className::create();
        }

        return $className::fromArray($data);
    }
public function createMessage ( array $ data = [ ] ) { /** @var Message $className */ $ className = $ this -> className ; if ( empty ( $ data ) ) { return $ className :: create ( ) ; } return $ className :: fromArray ( $ data ) ; }
Convenience method that creates a message instance with this schema.

@param array $data

@return Message
Convenience method that creates a message instance with this schema .