Get an array of response messages from all GroupObjects loaded

@return string[]
761193
public function getResponseMessages() : array
    {
        $responses = array();

        foreach ($this->objects as $object)
        {
            $responses[] = $object->respond();
        }

        $messages = array();

        foreach (self::responder($responses) as $message)
        {
            $messages[] = $message;
        }

        return $messages;
    }
642977
public function getItemsGroupedByTypes(): array
    {
        if (is_array($this->itemsGroupedByTypeCache)) {
            return $this->itemsGroupedByTypeCache;
        }

        $items = $this->getItems();
        $itemsGroupedByType = [];
        foreach ($items as $item) {
            if (!isset($itemsGroupedByType[$item->getType()])) {
                $itemsGroupedByType[$item->getType()] = [];
            }
            $itemsGroupedByType[$item->getType()][] = $item;
        }

        $this->itemsGroupedByTypeCache = $itemsGroupedByType;

        return $itemsGroupedByType;
    }
509914
public function getRemoteGroups(): array
    {
        $result = [];

        if (!(bool)Configure::read('Groups.remoteGroups.enabled')) {
            return $result;
        }

        if ((bool)Configure::read('Groups.remoteGroups.LDAP.enabled')) {
            $result = $this->_getLdapGroups();
        }

        return $result;
    }
205813
public static function getMessages(): array
    {
        $messages = Session::get(self::FLASH_KEY, []);
        Session::forget(self::FLASH_KEY);

        return $messages;
    }
986589
public function getGroups()
    {
        $request = new Request\GetGroupsRequest($this->getCredential());
        $response = $this->sendRequest($request);

        return Request\GetGroupsRequest::parseResponse($response);
    }
344213
public function messages()
    {
        $messages = [];
        $instances = $this->parents(true);
        foreach ($instances as $instance) {
            $messages[] = $instance->message();
        }
        return $messages;
    }
1209932
public function getGroupNames()
    {
        $names = [];
        $groupIdArr = $this->getGroupIdArr();
        foreach ($groupIdArr as $groupId) {
            $group = DpAdminGroup::getByGroupId($groupId);
            if ($group) {
                $names[] = $group['name'];
            }
        }

        return $names;
    }
1332689
public function message()
    {
        $messages = [];
        foreach($this->values as $key => $value) {
            if ($value->fails()) {
                $messages[$key] = $value->message();
            }
        }
        return $messages;
    }
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;
    }
457029
public function jsonSerialize(): array
    {
        $parentArray = parent::jsonSerialize();

        $returnArray = [
            'ID' => $this->smsID,
            'BundleID' => $this->bundleID,
            'Status' => $this->status,
            'StatusDescription' => $this->statusDescription,
            'To' => $this->recipient,
            'ModifiedDate' => $this->updated->format("Y-m-d\TH:i:s.").
                substr($this->updated->format('u'), 0, 3) ?? null,
            'CreatedDate' => $this->created->format("Y-m-d\TH:i:s.").
                substr($this->updated->format('u'), 0, 3) ?? null,
        ];
        return array_filter(array_merge($parentArray, $returnArray));
    }
1004046
public function getAllGroups ()
    {
        $request = new Request("GET", "https://api.weixin.qq.com/cgi-bin/groups/get");
        $response = $this->client->send($request);
        $json = json_decode($response->getBody());
        $groups = [];

        if (isset($json->groups)) {
            foreach ($json->groups as $group) {
                $groups[] = new Group($group->id, $group->name, $group->count);
            }
        } else {
            throw new Exception("bad response: expected property `groups`");
        }

        return $groups;
    }
124881
public function getAllMessage()
    {
        $messages = [];
        foreach (array_keys($this->errors) as $key) {
            $messages[$key] = $this->getMessage($key);
        }
        return $messages;
    }
302056
public static function fetchAllGroups()
    {
        $model = new self;

        $result = [];
        try {
            foreach ($model->select('group')->distinct()->get() as $row) {
                $result[] = $row->group;
            }
        } catch (\Exception $e) {
            // Do nothing.
        }

        return $result;
    }
146939
public function getData()
    {
        $subscription = $this->subscriptionManager
            ->findOneBy(
                ['userId' => $this->tokenStorage->getToken()->getUser()->getId(), 'handler' => 'portlet']
            );

        if (!$subscription) {
            return [];
        }

        $filter = $subscription->getFilter();

        if (!$filter) {
            return [];
        }

        $messages = $this->messageManager->findByCriteria($filter->getCriteria(), ['createdAt' => 'DESC'], 20);

        $priorityList = $this->messageManager->getPriorityNames();
        $typeList = $this->messageManager->getTypeNames();

        $data = [];
        foreach ($messages as $message) {
            $subject = '';

            $i = 0;
            do {
                $subject .= ($i ? '<wbr />' : '').mb_substr($message->getSubject(), $i, $i + 30, 'UTF-8');
                $i += 30;
            } while ($i <= strlen($message->getSubject()));

            $data[] = [
                'id' => $message->getId(),
                'subject' => $subject,
                'time' => $message->getCreatedAt()->format('U'),
                'priority' => $priorityList[$message->getPriority()],
                'type' => $typeList[$message->getType()],
                'channel' => $message->getChannel(),
            ];
        }

        return $data;
    }
595809
public function jsonSerialize()
    {
        $response = [];
        $response['displayMenu'] = $this->collection->displayMenu();
        $response['entries'] = [];
        $response['entryGroups'] = [];
        foreach ($this->collection->getEntries() as $entry) {
            $formatter = new EntryJsonFormatter($entry);
            $response['entries'][] = $formatter->jsonSerialize();
        }
        foreach ($this->collection->getEntryGroups() as $group) {
            $formatter = new GroupJsonFormatter($group);
            $response['entryGroups'][] = $formatter->jsonSerialize();
        }

        return $response;
    }
951931
public function getAll() {
		if ($this->hasAny()) {
			$messages = $_SESSION[self::SESSION_KEY_FLASH];

			$_SESSION[self::SESSION_KEY_FLASH] = [];

			return $messages;
		}
		else {
			return [];
		}
	}
18560
public function getMessages()
    {
        $messages = parent::getMessages();

        $options = $this->getOptions();
        foreach ($options as $option) {
            $widget = $this->getEntryWidget($option->value);
            $messages = array_merge($messages, $widget->getMessages());
        }

        return $messages;
    }