Get an array representation of the HipChatMessage.

@return array
329802
public function toArray()
    {
        $message = str_array_filter([
            'from' => $this->from,
            'message_format' => $this->format,
            'color' => $this->color,
            'notify' => $this->notify,
            'message' => $this->content,
            'attach_to' => $this->attachTo,
        ]);

        if (! is_null($this->card)) {
            $message['card'] = $this->card->toArray();
        }

        return $message;
    }
313843
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'type' => $this->type,
            'value' => $this->value,
            'style' => $this->style,
            'confirm' => $this->confirmation,
        ];
    }
754688
public function getData()
    {
        return [
            'recipient' => $this->user_ref ? ['user_ref' => $this->recipient] : ['id' => $this->recipient],
            'message' => [
                'text' => $this->text
            ],
            'tag'=> $this->tag,
            'notification_type'=> $this->notification_type,
            'messaging_type' => $this->messaging_type
        ];
    }
233003
public function toArray()
    {
        $dispatch = [];
        $dispatch['status'] = $this->statusCode;

        if ($this->hasMessage()) {
            $dispatch['message'] = $this->message;
        }

        if ($this->hasPayload()) {
            $dispatch = array_merge($dispatch, $this->payload);
        }

        return $dispatch;
    }
1249719
public function toArray()
    {
        return [
            'name'                      => $this->name,
            'label'                     => $this->label,
            'description'               => $this->description,
            'sandboxed'                 => $this->sandboxed,
            'supports_inline_execution' => $this->supportsInlineExecution,
        ];
    }
1199941
public function getRegexes() : array
    {
        return [
            $this->getPhoneNumbers(),                        
            $this->getUrls(),            
            $this->getEmoticons(),            
            $this->getHashTags(),           
            $this->getAsciiArrows(),            
            $this->getUsernames(),
            $this->getHashTags(),            
            $this->getWordsWith(),
            $this->getNumbers(),            
            $this->getWordsWithout(),            
            $this->getEllipsisDots(),            
            $this->getEverythingElse()
        ];
    }
1237449
public function toArray()
    {
        $result = [];

        if (!empty($this->value)) {
            if (!empty($this->details)) {
                $parts = explode('.', $this->value);
                $result['value'] = join('.', array_slice($parts, 0, $this->details));
            } else {
                $result['value'] = $this->value;
            }
        }

        if (!empty($this->alias)) {
            $result['alias'] = $this->alias;
        }

        if (!empty($this->nickname)) {
            $result['nickname'] = $this->nickname;
        }

        if (isset($result['value']) && !isset($result['alias']) && !isset($result['nickname'])) {
            return $result['value'];
        }

        return $result;
    }
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;
    }
1352842
public function getParams(): array
    {
        $params = [
            'chat_id' => $this->chatId,
            'audio' => $this->audio,
        ];

        if ($this->disableNotification !== null) {
            $params['disable_notification'] = (int)$this->disableNotification;
        }

        if ($this->replyToMessageId) {
            $params['reply_to_message_id'] = $this->replyToMessageId;
        }

        return $params;
    }
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),
        ];
    }
600054
public function toArray()
    {
        if (!is_array($this->getValue()))
            return array($this->getLabel(), $this->getValue());

        $ary = array($this->getLabel(), array());

        foreach ($this->getValue() as $hrExpr)
            $ary[1][] = $hrExpr->toArray();

        return $ary;
    }
501842
public function toArray()
    {
        $data = $this->_data;
        $data['message'] = $this->getMessage();
        $data['code'] = $this->getCode();
        $data['key'] = $this->getkey();
        $data = array_reverse($data);

        return $data;
    }
420487
public function toArray()
    {
        return [
            'success'          => $this->isSuccess(),
            'hostname'         => $this->getHostname(),
            'challenge_ts'     => $this->getChallengeTs(),
            'apk_package_name' => $this->getApkPackageName(),
            'error-codes'      => $this->getErrorCodes(),
        ];
    }
759424
public function asArray(): array
    {
        $theArray = [static::KEY_STATUS => $this->status];

        if ($this->data) {
            $theArray[static::KEY_DATA] = $this->data;
        }
        if (!$this->data && !$this->isError()) {
            // Data is optional for errors, so it should not be set
            // rather than be null.
            $theArray[static::KEY_DATA] = null;
        }

        if ($this->isError()) {
            $theArray[static::KEY_MESSAGE] = (string)$this->errorMessage;

            if (!empty($this->errorCode)) {
                $theArray[static::KEY_CODE] = (int)$this->errorCode;
            }
        }

        return $theArray;
    }
208516
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'human_status'        => $this->human_status(),
            'latest_update_id'    => $this->latest() ? $this->latest()->id : null,
            'latest_status'       => $this->latest_status(),
            'latest_human_status' => $this->latest_human_status(),
            'latest_icon'         => $this->latest_icon(),
            'permalink'           => $this->permalink(),
            'duration'            => $this->duration(),
            'meta'                => $this->meta(),
            'occurred_at'         => $this->occurred_at(),
            'created_at'          => $this->created_at(),
            'updated_at'          => $this->updated_at(),
        ]);
    }
48419
public function toArray(): array
    {
        return [
            'uuid' => $this->tokenUUID->toArray(),
            'app_uuid' => $this->appUUID->toArray(),
            'created_at' => $this->createdAt,
            'updated_at' => $this->updatedAt,
            'indices' => array_map(function (IndexUUID $indexUUID) {
                return $indexUUID->toArray();
            }, $this->indices),
            'endpoints' => $this->endpoints,
            'plugins' => $this->plugins,
            'ttl' => $this->ttl,
            'metadata' => $this->metadata,
        ];
    }
1281899
protected function attachmentMessageToArray()
    {
        $message = [];
        $message['recipient'] = $this->recipient;
        $message['notification_type'] = $this->notificationType;
        $message['message']['attachment']['type'] = $this->attachmentType;
        $message['message']['attachment']['payload']['url'] = $this->attachmentUrl;

        return $message;
    }