将 Message 属性数据转换为 array

@return array
516166
public function toArray()
    {
        $data = [];

        foreach ($this->ref->getProperties() as $property) {
            $name        = $property->getName();
            $data[$name] = $this->sanitizeToArrayValue($this->get($name));
        }

        return $data;
    }
577932
protected function getMessage()
    {
        $msg = $this->controller->app->session->getFlashBag()->takeAll();
        $msg = implode("\n", Arr::flatten($msg));

        return $msg;
    }
771537
protected function getMessages()
    {
        $messages = [];
        $path     = $this->sourcePath;

        if ( ! $this->file->exists($path)) {
            throw new \Exception("${path} doesn't exists!");
        }

        foreach ($this->file->allFiles($path) as $file) {
            $pathName = $file->getRelativePathName();

            if ($this->file->extension($pathName) !== 'php') {
                continue;
            }

            if ($this->isMessagesExcluded($pathName)) {
                continue;
            }

            $key = substr($pathName, 0, -4);
            $key = str_replace('\\', '.', $key);
            $key = str_replace('/', '.', $key);

            $messages[$key] = include $path . DIRECTORY_SEPARATOR . $pathName;
        }

        foreach ($this->file->allFiles(resource_path('lang')) as $file) {
            $pathName = $file->getRelativePathName();

            if ($this->file->extension($pathName) !== 'json') {
                continue;
            }
            $key                     = substr($pathName, 0, -4);
            $key                     = str_replace('\\', '.', $key);
            $key                     = str_replace('/', '.', $key);
            $messages[$key . 'json'] = json_decode(file_get_contents($file->getRealPath()));
        }

        return $messages;
    }
1217894
protected function getMessages()
    {
        $messages = [];
        foreach ($this->sourcePath as $namespace => $path) {
            $messages = array_merge($this->getMessagesFromSourcePath($path, $namespace), $messages);
        }

        return $messages;
    }
178191
public function getAllMessages()
    {
        $messages = [];
        foreach (array_keys($this->errors) as $key) {
            $messages = array_merge($messages, $this->getMessages($key));
        }
        return $messages;
    }
879897
public function toArray()
    {
        $data = array();
        foreach ($this->violations as $violation) {
            $data[] = $violation->getMessage();
        }

        return $data;
    }
62197
public function getMessagePartsAsArray(): array
    {
        if (!$this->messageIsValid()) {
            throw new \RuntimeException('Message is not valid');
        }

        $this->buildTargetPart();
        $this->buildOptionsPart();
        $this->buildPayloadPart();

        return \array_merge($this->targetPart, $this->optionsPart, $this->payloadPart);
    }
738012
public function toArray()
	{
		return [
			'name' => (string) $this->name,
			'email' => SerializationHelper::serialize($this->email),
			'links' => SerializationHelper::serialize($this->links)
		];
	}
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];
    }
284506
public function getMessageFormat() {
		$message = ['msg_type' => $this->msg_type];
		switch($this->msg_type) {
			case 'text':
				$message['content'] = $this->content;
				break;
			case 'video':
				$message['title'] = $this->title;
				$message['description'] = $this->description;
			case 'image':
			case 'voice':
				$message['media_id'] = $this->materialMedia->media_id;
				$message['media_url'] = $this->materialMedia->material->url;
				break;
			case 'music':
				$message['title'] = $this->title;
				$message['description'] = $this->description;
				$message['music_url'] = $this->music_url;
				$message['hq_music_url'] = $this->hq_music_url;
				$message['thumb_media_id'] = $this->thumbMaterialMedia->media_id;
				$message['thumb_media_url'] = $this->thumbMaterialMedia->material->url;
				break;
			case 'news':
				$pic_urls = $this->newsMedia->thumbUrlList;
				$urls = $this->newsMedia->urlList;
				$articles = [];
				foreach($this->newsMedia->news->items as $index => $item) {
					if(!isset($pic_urls[$index]) || !isset($urls[$index])) {
						break;
					}
					$articles[] = [
						'title' => $item->title,
						'description' => $item->digest,
						'pic_url' => $pic_urls[$index],
						'url' => $urls[$index],
					];
				}
				$message['articles'] = Json::encode($articles);
				break;
			default:
				return [];
				break;
		}

		return $message;
	}
1129235
public function getMessages(): array
    {
        $templates = [
            new Message($this->message->getBody(), $this->message->getContentType()),
        ];

        // TODO: Loop through parts

        return $templates;
    }
1260036
public function getErrorMessages() {
        $messages = array();
        
        foreach($this->entries as $entry) {
            if($entry->isError()) {
                $messages[] = $entry->getMessage();
            }
        }
        
        return $messages;
    }
328004
public function listMessages()
    {
        $messages = array();
        fseek( $this->fh, 0 );
        // Skip the first mail as this is the mbox header
        $position = $this->findFirstMessage();
        if ( $position === false )
        {
            return $messages;
        }
        // Continue reading through the rest of the mbox
        do
        {
            $position = $this->findNextMessage();
            if ( $position !== false )
            {
                $messages[] = $position;
            }
        } while ( $position !== false );

        return $messages;
    }
1341070
public function getMessages()
    {
        if (empty($this->messages)) {
            $this->messages = [
                new IncomingMessage($this->event->get('text'), $this->event->get('msisdn'), $this->event->get('to'), $this->payload),
            ];
        }

        return $this->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);

        }, []);
    }
693785
protected function readMessages()
    {
        $len = $this->readHeader('v', 2);
        $instructions = rtrim($this->readHeaderRaw($len), "\0");
        $len = $this->readHeader('v', 2);
        $hints = rtrim($this->readHeaderRaw($len), "\0");
        $len = $this->readHeader('v', 2);
        $victory = rtrim($this->readHeaderRaw($len), "\0");
        $len = $this->readHeader('v', 2);
        $loss = rtrim($this->readHeaderRaw($len), "\0");
        $len = $this->readHeader('v', 2);
        $history = rtrim($this->readHeaderRaw($len), "\0");
        $len = $this->readHeader('v', 2);
        $scouts = rtrim($this->readHeaderRaw($len), "\0");
        return (object) [
            'instructions' => $instructions,
            'hints' => $hints,
            'victory' => $victory,
            'loss' => $loss,
            'history' => $history,
            'scouts' => $scouts,
        ];
    }
313843
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'type' => $this->type,
            'value' => $this->value,
            'style' => $this->style,
            'confirm' => $this->confirmation,
        ];
    }