Create a new Message from this FetchActions.

@return \AlphaRPC\Common\Socket\Message
171116
public function toMessage()
    {
        $msg = new Message(array(
                $this->requestId,
                $this->action,
            ));

        $msg->append($this->params);

        return $msg;
    }
1034835
public function receiveNoWait()
    {
        if (null == $this->message) {
            if ($message = $this->doReceive($this->receiveNoWaitCallback, $this)) {
                $this->message = $message;

                call_user_func($this->finallyCallback, $this);
            }
        }

        return $this->message;
    }
1124922
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        $video = [
            'type' => MessageType::VIDEO,
            'originalContentUrl' => $this->originalContentUrl,
            'previewImageUrl' => $this->previewImageUrl,
        ];

        if ($this->quickReply) {
            $video['quickReply'] = $this->quickReply->buildQuickReply();
        }

        $this->message[] = $video;

        return $this->message;
    }
1359751
public function getMessages()
    {
        return $this->event->map(function ($message) {
            if (isset($message['picUrl'])) {
                $image = new Image($message['picUrl'], $message);
                $image->title($message['attribution']['name']);

                $incomingMessage = new IncomingMessage(Image::PATTERN, $message['from'], $message['chatId'], $message);
                $incomingMessage->setImages([$image]);
            } elseif (isset($message['stickerUrl'])) {
                $sticker = new Image($message['stickerUrl'], $message);
                $sticker->title($message['attribution']['name']);

                $incomingMessage = new IncomingMessage(Image::PATTERN, $message['from'], $message['chatId'], $message);
                $incomingMessage->setImages([$sticker]);
            } elseif (isset($message['videoUrl'])) {
                $incomingMessage = new IncomingMessage(Video::PATTERN, $message['from'], $message['chatId'], $message);
                $incomingMessage->setVideos([new Video($message['videoUrl'], $message)]);
            } else {
                $incomingMessage = new IncomingMessage($message['body'], $message['from'], $message['chatId'], $message);
            }

            return $incomingMessage;
        })->toArray();
    }
95982
public function getTranslatableMessage()
    {
        if (isset($this->plural)) {
            return new Plural(
                $this->singular,
                $this->plural,
                $this->values
            );
        } else {
            return new Message(
                $this->singular,
                $this->values
            );
        }
    }
52069
public function getMessages()
    {
        if (empty($this->messages)) {
            $intent = $this->event->get('intent');
            $session = $this->payload->get('session');

            $message = new IncomingMessage($intent['name'], $session['user']['userId'], $session['sessionId'], $this->payload);
            if (! is_null($intent) && array_key_exists('slots', $intent)) {
                $message->addExtras('slots', Collection::make($intent['slots']));
            }
            $this->messages = [$message];
        }

        return $this->messages;
    }
59993
protected function getResponseMessage()
    {

        // read the first 4 bytes which include the length of the response
        $lengthEncoded = $this->client->read(4);

        if (strlen($lengthEncoded) < 4) {
            return new Message('', Message::TYPE_RESPONSE_VALUE);
        }

        $lengthInBytes = unpack('V1size', $lengthEncoded)['size'];

        if ($lengthInBytes <= 0) {
            return new Message('', Message::TYPE_RESPONSE_VALUE);
        }

        $responseData = $this->client->read($lengthInBytes);

        // return an empty message if the server did not send any response
        if (null === $responseData) {
            return new Message('', Message::TYPE_RESPONSE_VALUE);
        }

        $responseMessage = new Message();
        $responseMessage->initializeFromRconData($responseData);

        if ($lengthInBytes >= 4000) {
            $this->handleFragmentedResponse($responseMessage);
        }

        return $responseMessage;
    }
262024
public function toMessage()
    {
        $m = new Message(array(
            $this->getRequestId(),
            $this->getActionName(),
        ));
        $m->append($this->getParameters());

        return $m;
    }
780100
protected function createMessage(QueueSendMessageTransfer $messageTransfer)
    {
        $message = new AMQPMessage($messageTransfer->getBody(), $this->config->getMessageConfig());
        $headers = $messageTransfer->getHeaders();

        if ($headers !== null) {
            $headersTable = new AMQPTable($headers);
            $message->set('application_headers', $headersTable);
        }

        return $message;
    }
74390
public function receiveMessage()
    {
        $response = $this->client->receiveMessage(['QueueUrl' => $this->queueName]);

        if (empty($response['Messages'])) {
            return false;
        }
        $data = reset($response['Messages']);
        return new Message([
            'messageId' => $data['MessageId'],
            'messageBody' => $data['Body'],
            'queue' => $this->queue,
            'receiptHandle' => $data['ReceiptHandle'],
        ]);
    }
541103
protected function loadMessages()
    {
        $messages = Collection::make($this->event->get('messaging'));
        $messages = $messages->transform(function ($msg) {
            $message = new IncomingMessage('', $this->getMessageSender($msg), $this->getMessageRecipient($msg), $msg);
            if (isset($msg['message']['text']) && ! isset($msg['message']['quick_reply']['payload'])) {
                $message->setText($msg['message']['text']);

                if (isset($msg['message']['nlp'])) {
                    $message->addExtras('nlp', $msg['message']['nlp']);
                }
            } elseif (isset($msg['postback']['payload'])) {
                $this->isPostback = true;

                $message->setText($msg['postback']['payload']);
            } elseif (isset($msg['message']['quick_reply']['payload'])) {
                $this->isPostback = true;

                $message->setText($msg['message']['quick_reply']['payload']);
            }

            return $message;
        })->toArray();

        if (count($messages) === 0) {
            $messages = [new IncomingMessage('', '', '')];
        }

        $this->messages = $messages;
    }
610424
public static function getMessage()
    {
        $result = static::$message;
        if (empty($result)) {
            static::setMessage(static::DEFAULT_MESSAGE);
            $result = static::$message;
        }
        return $result;
    }
339739
public function buildMessage()
    {
        $messages = [];
        foreach ($this->messageBuilders as $messageBuilder) {
            foreach ($messageBuilder->buildMessage() as $message) {
                $messages[] = $message;
            }
        }

        return $messages;
    }
1082865
public function newAction()
        {

            $oRemoteApp = new RemoteApp();
            $oRemoteApp->setApiUrl("swControl/");
            $oRemoteApp->setActivated(true);
            $oRemoteApp->setIncludelog(true);
            $oRemoteApp->setNotificationRecipient($this->getUser()->getEmail());
            $oRemoteApp->setNotificationSender($this->getUser()->getEmail());
            $oRemoteApp->setNotificationChange(true);
            $oRemoteApp->setNotificationError(true);
            $form = $this->createCreateForm($oRemoteApp);

            return $this->render('SlashworksAppBundle:RemoteApp:new.html.twig', array(
                'entity' => $oRemoteApp,
                'form'   => $form->createView(),
            ));
        }
48047
public function build()
    {
        $stream = new Stream('php://temp', 'wb+');


        $stream->write(json_encode(new MessageDecorator($this->getMessage())));

        return $this->getHttpMessage()
            ->withAddedHeader('Content-Type', 'application/json')
            ->withBody($stream);
    }
1351174
private function createRpbMessage(GetRequest $request)
    {
        $message = new RpbGetReq();

        $message->setBucket($request->bucket);
        $message->setType($request->type);
        $message->setKey($request->key);

        if ($request->r !== null) {
            $message->setR($this->encodeQuorum($request->r));
        }

        if ($request->pr !== null) {
            $message->setPr($this->encodeQuorum($request->pr));
        }

        if ($request->basicQuorum !== null) {
            $message->setBasicQuorum($request->basicQuorum);
        }

        if ($request->notfoundOk !== null) {
            $message->setNotfoundOk($request->notfoundOk);
        }

        return $message;
    }
1010354
public function getMessage()
    {
        /** @noinspection IsEmptyFunctionUsageInspection */
        /** @noinspection PhpUndefinedMethodInspection */
        if (!empty(parent::getMessage())) {
            /** @noinspection PhpUndefinedMethodInspection */
            return parent::getMessage();
        }

        return $this->_storage->loadMessage(
            $this
        );
    }