Returns all the messages.

@return array|string
@author: Eddilbert Macharia (http://eddmash.com)<edd.cowan@gmail.com>
771009
public function getMessages()
    {
        $message = [];
        foreach ($this->errorList as $item) {
            $message[] = $item->getMessage();
        }

        return $message;
    }
355101
public function getExceptionMessages()
    {
        $messages = array();
        foreach( $this->__get('exceptionsFlat') as $exception ) {
            $messages[] = $exception->getMessage();
        }
        return $messages;
    }
1269065
public function getMessages()
    {
        $messages = array();

        foreach ($this->getDescendants() as $widget) {
            $messages = array_merge($messages, $widget->getMessages());
        }

        return $messages;
    }
793675
public function getMessages()
    {
        $message = new IncomingMessage(File::PATTERN, $this->event->get('from')['id'], $this->event->get('conversation')['id'],
            $this->payload);
        $message->setFiles($this->getAttachmentUrls());

        return [$message];
    }
550526
protected function get_messages() {
        global $SESSION;

        $messages = array();
        if (!empty($SESSION->lesson_messages) && is_array($SESSION->lesson_messages) && array_key_exists($this->properties->id, $SESSION->lesson_messages)) {
            $messages = $SESSION->lesson_messages[$this->properties->id];
            unset($SESSION->lesson_messages[$this->properties->id]);
        }

        return $messages;
    }
825936
public function getMessages()
    {
        $message = new IncomingMessage(Image::PATTERN, $this->event->get('ToUserName'), $this->event->get('FromUserName'),
            $this->event);
        $message->setImages($this->getImages());

        return [$message];
    }
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;
    }
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];
    }
839287
protected function getMessages()
    {
        if (! $this->_messenger instanceof \MUtil_Controller_Action_Helper_FlashMessenger) {
            $this->_messenger = new \MUtil_Controller_Action_Helper_FlashMessenger();
        }

        return $this->_messenger->getMessagesOnly();
    }
1325386
public function recordedMessages()
    {
        $allRecordedMessages = [];

        foreach ($this->messageRecorders as $messageRecorder) {
            $allRecordedMessages = array_merge($allRecordedMessages, $messageRecorder->recordedMessages());
        }

        return $allRecordedMessages;
    }
568232
public function getMessages()
    {
        if (empty($this->messages)) {
            $message = new IncomingMessage($this->event->get('Body'), $this->event->get('From'), $this->event->get('To'));

            $this->messages = [$message];
        }

        return $this->messages;
    }
339739
public function buildMessage()
    {
        $messages = [];
        foreach ($this->messageBuilders as $messageBuilder) {
            foreach ($messageBuilder->buildMessage() as $message) {
                $messages[] = $message;
            }
        }

        return $messages;
    }
129168
public function getMessages() : array
    {
        $messages = [];

        foreach ($this->getLogs() as $log) {
            foreach ($log->getMessages() as $message) {
                $messages[] = $message;
            }
        }

        return $messages;
    }
483283
public function getMessages()
    {
        $messages = [];
        /** @var Element $element */
        foreach ($this->_elements as $element) {
            $messages[$element->getName()] = $element->getMessages();
        }
        return $messages;
    }
1167380
public function getMessages()
    {
        return $this->conversation->getMessages($this->user, $this->getPaginationParams(), $this->deleted);
    }
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();
    }
768535
protected function _getApplicationMessages()
    {
        $messages       = $this->_application->getMessageQueue();
        $descriptions   = array();

        foreach($messages as $message)
        {
            if($message['type'] == 'error') {
                $descriptions[] = $message['message'];
            }
        }

        return $descriptions;
    }