Fetches messages from the session that may have been set in previous page
actions.

<code>
// Do not call this method directly instead use
$lesson->messages;
</code>

@return array
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;
    }
841203
protected function get_messages()
    {
        $lang_file = __DIR__.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.$this->lang.'.php';
        $messages = require $lang_file;

        if ($validation_methods_errors = self::$validation_methods_errors) {
            $messages = array_merge($messages, $validation_methods_errors);
        }
        return $messages;
    }
935160
public function getMessages()
    {
        $messages = array();

        foreach ($this->replicators as $replicator_id) {
            foreach ($this->input_cells as $cell) {
                $messages = array_merge(
                    $messages,
                    $cell->getWidget($replicator_id)->getMessages()
                );
            }
        }

        return $messages;
    }
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;
    }
36007
public function getMessages()
    {
        $messages = $this->messages;
        foreach ($this->getCompositeWidgets() as $widget) {
            $messages = array_merge($messages, $widget->getMessages());
        }

        return $messages;
    }
1269065
public function getMessages()
    {
        $messages = array();

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

        return $messages;
    }
493457
public function getFlashMessages()
    {
        if (is_null($this->_flashMessages)) {
            $this->_flashMessages = FlashMessages::getInstance();
        }
        return $this->_flashMessages;
    }
1277551
public function getMessages()
    {
        if ($this->event->get('MsgType') === 'text') {
            $text = $this->event->get('Content');
        } else {
            $text = $this->event->get('Url');
        }

        return [
            new IncomingMessage($text, $this->event->get('FromUserName'),
                $this->event->get('ToUserName'), $this->event),
        ];
    }
73722
public function getMessages()
    {
        if (empty($this->messages)) {
            $message = new IncomingMessage(Image::PATTERN, $this->event->get('from')['id'], $this->event->get('conversation')['id'],
                $this->payload);
            $message->setImages($this->getImagesUrls());
            $this->messages = [$message];
        }

        return $this->messages;
    }
35906
protected function getMessages() {
        if (!$this->_messages) {
            $this->_messages = new MessageList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['sid']
            );
        }

        return $this->_messages;
    }
422631
public function getMessages()
    {
        $messages = $this->messages;

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

        return $messages;
    }
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];
    }
675363
public function getCauseMessage()
    {
        $causes  = [];
        $current = [
            'class'   => get_class($this),
            'message' => $this->getMessage(),
            'code'    => $this->getCode(),
            'file'    => $this->getFile(),
            'line'    => $this->getLine()
        ];

        $causes[] = $current;
        $previous = $this->getPrevious();

        while ($previous !== null) {
            if ($previous instanceof Exception) {
                $prevCauses = $previous->getCauseMessage();

                foreach ($prevCauses as $cause) {
                    $causes[] = $cause;
                }
            } elseif ($previous instanceof PhpException) {
                $causes[] = [
                    'class'   => get_class($previous),
                    'message' => $previous->getMessage(),
                    'code'    => $previous->getCode(),
                    'file'    => $previous->getFile(),
                    'line'    => $previous->getLine()
                ];
            }

            $previous = $previous->getPrevious();
        }

        return $causes;
    }
915092
public function getUsersAge()
    {
        $dates = $this->getStartEndDate();

        $data = LaravelAnalytics::performQuery($dates['start'], $dates['end'], 'ga:sessions',
            ['dimensions' => 'ga:userAgeBracket']);

        $labels = [];
        $datasets = [];
        $rows = $data->rows;
        if (is_null($rows)) {
            return ['labels' => [], 'datasets' => []];
        }
        foreach ($rows as $k => $item) {
            $labels[] = ucfirst($item[0]);
            $datasets[] = $item[1];
        }

        $datasets = [$this->getDataSet('Ages', $datasets, 0)];

        return ['labels' => $labels, 'datasets' => $datasets];
    }
707527
protected function readFromSession()
    {
        if (is_array($this->session->get(self::SESSION_KEY))) {
            $this->messages = $this->session->get(self::SESSION_KEY);
        }
        return $this;
    }
429888
public function getMessages()
    {
        $results  = $this->getResults();
        $messages = [];

        foreach ($results as $result) {
            /** @noinspection SlowArrayOperationsInLoopInspection */
            $messages = array_replace_recursive($messages, $result->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];
    }