Get all messages saved into the message queue.
@return array Array with messages
773411
public function getMessages()
	{
		return array_merge($this->fatals, $this->errors, $this->warnings, $this->notices);
	}
737860
protected function textMessageToArray()
    {
        $message = [];
        $message['recipient'] = $this->recipient;
        $message['notification_type'] = $this->notificationType;
        $message['message']['text'] = $this->text;

        return $message;
    }
1091170
public function getMessages($preserveMessages = false) {
        if ($this->hasMessages()) {
            $messages = self::$_store->messages;
            if (!$preserveMessages) {
                $this->clearMessages();
            }
            return $messages;
        }
        return array();
    }
327481
protected function getMessageInteractions() {
        if (!$this->_messageInteractions) {
            $this->_messageInteractions = new MessageInteractionList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['sessionSid'],
                $this->solution['sid']
            );
        }

        return $this->_messageInteractions;
    }
1245693
public function getMessages()
    {
        $messages = parent::getMessages();
        if ($this->tile !== null) {
            $messages = array_merge($messages, $this->tile->getMessages());
        }

        return $messages;
    }
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;
    }
684987
public function toArray()
    {
        $messages = [];
        foreach ($this->messages as $message) {
            $messages[] = $message->raw();
        }

        $previousMessages = $this->handler->getPreviousMessages();

        if (is_array($previousMessages)) {
            return array_merge($previousMessages, $messages);
        }

        return $messages;
    }
869446
public function attachmentMessages()
    {
        $result = [];
        foreach ($this->entries as $entry) {
            foreach ($entry->messages as $entryMessage) {
                if ($entryMessage->isMessage) {
                    if ($entryMessage->message->hasAttachments) {
                        $result[] = $entryMessage->message;
                    }
                }
            }
        }
        return collect($result);
    }
112840
public function getLastMessage() {
        $messagesClone = $this->messages;
        $keys = array_keys($messagesClone);
        $key = array_pop($keys);
        return $this->messages[$key];
    }
784242
public function getMessages()
    {
        $message = new IncomingMessage(Location::PATTERN, $this->event->get('ToUserName'), $this->event->get('FromUserName'),
            $this->event);
        $message->setLocation($this->getLocation());

        return [$message];
    }
652251
protected function loadMessages()
    {
        $messages = Collection::make($this->event->get('messaging'))->filter(function ($msg) {
            return isset($msg['message']) && isset($msg['message']['attachments']) && isset($msg['message']['attachments']);
        })->transform(function ($msg) {
            $message = new IncomingMessage(File::PATTERN, $msg['sender']['id'], $msg['recipient']['id'], $msg);
            $message->setFiles($this->getFiles($msg));

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

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

        $this->messages = $messages;
    }
429888
public function getMessages()
    {
        $results  = $this->getResults();
        $messages = [];

        foreach ($results as $result) {
            /** @noinspection SlowArrayOperationsInLoopInspection */
            $messages = array_replace_recursive($messages, $result->getMessages());
        }

        return $messages;
    }
1260036
public function getErrorMessages() {
        $messages = array();
        
        foreach($this->entries as $entry) {
            if($entry->isError()) {
                $messages[] = $entry->getMessage();
            }
        }
        
        return $messages;
    }
947385
public function getMessages()
    {
        $message = new IncomingMessage(Audio::PATTERN, $this->event->get('ToUserName'), $this->event->get('FromUserName'),
            $this->event);
        $message->setAudio($this->getAudio());

        return [$message];
    }
83811
private function getMessages()
    {
        $messages = [];
        $content = '';
        fseek($this->fh, 0);
        while (!feof($this->fh)) {
            $content .= fgets($this->fh);
        }
        if ($content) {
            $messages = json_decode($content, true);
        }
        return $messages;
    }
1320296
public function getMessages(): array
    {
        $errors = $this->getErrors();

        $keys = array_keys($errors);

        return array_reduce($keys, function ($messages, $key) use ($errors) {

            $translated = $this->translator->getMessages($key, $errors[$key]);

            return array_merge($messages, $translated);

        }, []);
    }
1069674
public function getMessages()
    {
        $messages = parent::getMessages();

        if ($this->model !== null) {
            foreach ($this->model as $row) {
                foreach ($this->columns as $column) {
                    $messages = array_merge(
                        $messages,
                        $column->getMessages($row)
                    );
                }

                foreach ($this->spanning_columns as $column) {
                    $messages = array_merge(
                        $messages,
                        $column->getMessages($row)
                    );
                }
            }

            foreach ($this->extra_rows as $row) {
                if ($row instanceof SwatTableViewWidgetRow) {
                    $messages = array_merge($messages, $row->getMessages());
                }
            }
        }

        return $messages;
    }