Transform transfer message.

@return array
487227
public function transformTransfer(AbstractMessage $message)
    {
        $response = [];

        // 指定客服
        if ($message->get('account')) {
            $response['TransInfo'] = [
                'KfAccount' => $message->get('account'),
            ];
        }

        return $response;
    }
963873
protected function transform($messages, $format, $messageKey)
    {
        $messages = (array) $messages;

        // We will simply spin through the given messages and transform each one
        // replacing the :message place holder with the real message allowing
        // the messages to be easily formatted to each developer's desires.
        foreach ($messages as $key => &$message) {
            $replace = [':message', ':key'];

            $message = str_replace($replace, [$message, $messageKey], $format);
        }

        return $messages;
    }
518101
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'return_success_url' => $this->return_success_url,
            'return_failure_url' => $this->return_failure_url,
            'notification_url'   => $this->notification_url,
            'source_wallet_id'   => $this->source_wallet_id,
            'source_wallet_pwd'  => $this->transformWalletPassword($this->source_wallet_pwd)
        ];
    }
601964
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'              => $this->transformAmount($this->amount, $this->currency),
            'currency'            => $this->currency,
            'customer_email'      => $this->customer_email,
            'customer_phone'      => $this->customer_phone,
            'return_success_url'  => $this->return_success_url,
            'return_failure_url'  => $this->return_failure_url,
            'bank_code'           => $this->bank_code,
            'bank_name'           => $this->bank_name,
            'bank_branch'         => $this->bank_branch,
            'bank_account_name'   => $this->bank_account_name,
            'bank_account_number' => $this->bank_account_number,
            'billing_address'     => $this->getBillingAddressParamsStructure(),
            'shipping_address'    => $this->getShippingAddressParamsStructure()
        ];
    }
541040
protected function transform($messages, $format, $messageKey)
    {
        $messages = (array) $messages;

        // We will simply spin through the given messages and transform each one
        // replacing the :message place holder with the real message allowing
        // the messages to be easily formatted to each developer's desires.
        foreach ($messages as $key => &$message) {
            $replace = [':message', ':key'];

            if ($message instanceof MessageBag) {
                // Do nothing.
            } elseif (is_array($message)) {
                foreach ($message as $k => &$m) {
                    $m = str_replace($replace, [$m, $messageKey], $format);
                }
            } else {
                $message = str_replace($replace, [$message, $messageKey], $format);
            }
        }

        return $messages;
    }
1196091
public function split(): array
    {
        $result = [];
        foreach ($this->recipients as $recipient) {
            $result[] = self::create(
                $this->ciphertext,
                $this->iv,
                $this->tag,
                $this->aad,
                $this->sharedHeader,
                $this->sharedProtectedHeader,
                $this->encodedSharedProtectedHeader,
                [$recipient]
            );
        }

        return $result;
    }
1074862
public function transform()
    {
        $data = $this->getData();

        $transformedData = [
            'identifier' => ((isset($data['id']) === true) ? $data['id'] : ''),
            'name' => $data['_name'],
            'description' => ((isset($data['description']) === true) ? $data['description'] : ''),
            'kind' => ((isset($data['kind']) === true) ? $data['kind'] : ''),
            'state' => ((isset($data['state']) === true) ? $data['state'] : ''),
            'parent' => ((isset($data['parent']) === true) ? $data['parent'] : '')
        ];

        return $transformedData;
    }
1070663
protected function transform($messages, $format)
        {
            $messages = (array) $messages;

            foreach ($messages as $key => &$message) {
                $message = repl(':message', $message, $format);
            }

            return $messages;
        }
1331867
protected function processMigrations()
    {
        $messages = '';

        $migrationsPaths = [
            '@vendor/dektrium/yii2-user/migrations',
            '@yii/rbac/migrations',
            '@pheme/settings/migrations',
        ];

        foreach ($migrationsPaths as $path)
        {
            $migration = new Migration(Yii::getAlias($path));
            $migration->up();
            $messages .= implode("\n", $migration->messages);
        }

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

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

        return $messages;
    }
52069
public function getMessages()
    {
        if (empty($this->messages)) {
            $intent = $this->event->get('intent');
            $session = $this->payload->get('session');

            $message = new IncomingMessage($intent['name'], $session['user']['userId'], $session['sessionId'], $this->payload);
            if (! is_null($intent) && array_key_exists('slots', $intent)) {
                $message->addExtras('slots', Collection::make($intent['slots']));
            }
            $this->messages = [$message];
        }

        return $this->messages;
    }
468870
public function mapInboundPostVarsToEmail_messagesFields() {

        $data = [];

        $data['user_id']            = $this->getUserIdByMappedEmailAddress();

        $data['from_email_address'] = trim($this->request->input('sender'));
        $data['from_name']          = $this->genericWashText($this->request ->input('from'));
        $data['to_email_address']   = $this->setToEmailAddressField();
        $data['to_name']            = $this->setToField();
        $data['subject']            = $this->genericWashText($this->request->input('subject'));
        $data['body']               = $this->setBodyField();
        $data['message_header']     = json_decode($this->request->input('message-headers'));
        $data['recipient']          = $this->request->input('recipient');

        return $data;
    }
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];
    }
1119098
protected function getPaymentTransactionStructure()
    {
        return [
            'usage'        => $this->usage,
            'remote_ip'    => $this->remote_ip,
            'amount'       => $this->transformAmount($this->amount, $this->currency),
            'currency'     => $this->currency,
            'reference_id' => $this->reference_id
        ];
    }
719389
protected function getPaymentTransactionStructure()
    {
        return [
            'return_success_url'  => $this->return_success_url,
            'return_failure_url'  => $this->return_failure_url,
            'amount'              => $this->transformAmount($this->amount, $this->currency),
            'currency'            => $this->currency,
            'is_payout'           => var_export($this->is_payout, true),
            'customer_account_id' => $this->customer_account_id,
            'customer_email'      => $this->customer_email,
            'customer_phone'      => $this->customer_phone,
            'billing_address'     => $this->getBillingAddressParamsStructure(),
            'shipping_address'    => $this->getShippingAddressParamsStructure()
        ];
    }
18722
public function transformTextCard(AbstractMessage $message)
    {
        return [
            'msgtype'  => 'textcard',
            'textcard' => [
                'title'       => $message->get('title'),
                'description' => $message->get('description'),
                'url'         => $message->get('url'),
                'btntxt'      => $message->get('btntxt'),
            ],
        ];
    }
586033
protected function genericMessageToArray()
    {
        $message = [];
        $message['recipient'] = $this->recipient;
        $message['notification_type'] = $this->notificationType;
        $message['message']['attachment']['type'] = 'template';
        $message['message']['attachment']['payload']['template_type'] = 'generic';
        $message['message']['attachment']['payload']['elements'] = $this->cards;

        return $message;
    }