Build Payload

@return string
770530
protected function payload()
    {
        $buffer = "";

        # Payload
        $buffer .= $this->message;
        Debug::Log(Debug::DEBUG, 'Message PUBLISH: Message='.$this->message);

        return  $buffer;
    }
749538
private function build() {

        $this -> fill();

        $html = '<input type="'. $this -> type .'"';
        
        foreach($this -> attributes as $attribute => $value) {
            $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
        }

        $html .= '>';

        return $html;
    }
923307
private function build(): void
    {
        $prefix = "<?xml version='1.0' encoding='UTF-8'?>" . $this->glue() . "<feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>";
        $suffix = '</feed>';

        $xml = collect($this->filters)->map(function ($items) {
            return $this->buildEntry($items);
        })->implode($this->glue());

        $this->xml = collect([$prefix, $xml, $suffix])->implode($this->glue());

        if ($this->writeFile) {
            $this->filesystem->dumpFile($this->outputFile, $this->xml);
        }
    }
83286
public function prepare()
        {
            $this->setCurlOption(CURLOPT_CUSTOMREQUEST, 'PUT');

            if(isset($this->options['data'])) {
                // Data
                $data = (isset($this->options['is_payload']) && $this->options['is_payload'] === true) ? json_encode($this->options['data']) : http_build_query($this->options['data']);

                $this->setCurlOption(CURLOPT_POSTFIELDS, $data);
            }
        }
48047
public function build()
    {
        $stream = new Stream('php://temp', 'wb+');


        $stream->write(json_encode(new MessageDecorator($this->getMessage())));

        return $this->getHttpMessage()
            ->withAddedHeader('Content-Type', 'application/json')
            ->withBody($stream);
    }
360127
public function createPayload()
    {
        $payload = $this->extras;

        $payload['job'] = $this->job;
        $payload['data'] = $this->data;

        // Create special payload if it is a Closure
        if ($this->job instanceof \Closure) {
            $payload['closure'] = serialize(new SerializableClosure($this->job));
            $payload['job'] = $this->closureClass;
        }

        return $payload;
    }
214335
function payload()
    {
        if ( $this->IsFault )
        {
            return json_encode( array(
                'content' => null,
                'error_text' => $this->FaultString() ) );
        }
        else
        {
            return json_encode( array(
                'content' => $this->Value,
                'error_text' => null ) );
        }
    }
408633
public function ___build(): string
    {
        $tables = \implode(', ', $this->from);
        $where = $limit = '';

        if ($this->where !== '') {
            $where = \sprintf(' WHERE %s', $this->where);
        }
        if ($this->limit !== 0) {
            $limit = \sprintf(' LIMIT %s', $this->limit);
        }

        return \sprintf('DELETE FROM %s%s%s', $tables, $where, $limit);
    }
1148866
public function getPayload() {
        $payload = array();
        if ($this->serviceSid) {
            $payload['service_sid'] = $this->serviceSid;
        }
        if ($this->endpointId) {
            $payload['endpoint_id'] = $this->endpointId;
        }
        if ($this->deploymentRoleSid) {
            $payload['deployment_role_sid'] = $this->deploymentRoleSid;
        }
        if ($this->pushCredentialSid) {
            $payload['push_credential_sid'] = $this->pushCredentialSid;
        }

        return $payload;
    }
1040163
public function getPayload()
    {
        // APNS base payload structure
        $payload = array(
            'aps' => array(),
        );

        // Build notification
        if ($this->getPayloadAlertKeyValue()) {
            $payload['aps']['alert'] = $this->getPayloadAlertKeyValue();
        }

        // Build extra content
        if (!is_null($this->getBadge())) {
            $payload['aps']['badge'] = $this->getBadge();
        }
        if ($this->getSound() !== self::DEFAULT_SOUND) {
            $payload['aps']['sound'] = $this->getSound();
        }
        if (!is_null($this->getContentAvailable())) {
            $payload['aps']['content-available'] = $this->getContentAvailable();
        }
        if ($this->getCategory()) {
            $payload['aps']['category'] = $this->getCategory();
        }
        if ($this->getData()) {
            $payload['data'] = $this->getData();
        }

        // Return payload
        return $payload;
    }
1209045
function build(): string
    {
        if ($this->host !== null && $this->preferredFormat === static::ABSOLUTE) {
            return $this->buildAbsolute();
        } else {
            return $this->buildRelative();
        }
    }
563420
public function build()
    {
        $html = '<a href="' . $this->url . '"';

        if ($this->ajax) {
            $html .= ' data-ajax';
        }

        $html .= '>' . $this->text;

        if ($this->current) {
            $html .= ' <span class="sr-only">(current)</span>';
        }

        $html .= '</a>';

        return $html;
    }
991129
public function buildValue()
    {
        $actions = [
            'add' => [],
            'replace' => [],
            'remove' => [],
        ];

        foreach ($this->actions as $action) {
            switch ($action->getName()) {
                case 'add':
                    $actions['add'][] = [$action->getArgument(0)];
                    break;
                case 'replace':
                    $actions['replace'][] = [$action->getArgument(0), $action->getArgument(1)];
                    break;
                case 'remove':
                    $actions['remove'][] = [$action->getArgument(0)];
                    break;
            }
        }

        $builder = $this->getBuilder();

        foreach ($actions as $action => $calls) {
            foreach ($calls as $arguments) {
                call_user_func_array([$builder, $action], $arguments);
            }
        }

        return $builder->get();
    }
1098497
function payload( )
    {
        $doc = new DOMDocument( '1.0', 'utf-8' );
        $doc->name = "eZSOAP message";

        $root = $doc->createElementNS( ggSOAPRequest::ENV, ggSOAPRequest::ENV_PREFIX . ':Envelope' );

        $root->setAttribute( 'xmlns:' . ggSOAPRequest::XSI_PREFIX, ggSOAPRequest::SCHEMA_INSTANCE );
        $root->setAttribute( 'xmlns:' . ggSOAPRequest::XSD_PREFIX, ggSOAPRequest::SCHEMA_DATA );
        $root->setAttribute( 'xmlns:' . ggSOAPRequest::ENC_PREFIX, ggSOAPRequest::ENC );

        // add the body
        $body = $doc->createElement(  ggSOAPRequest::ENV_PREFIX . ':Body' );
        $root->appendChild( $body );

        // Check if it's a fault
        if ( $this->Value instanceof ggWebservicesFault || $this->Value instanceof eZSOAPFault )
        {
            $fault = $doc->createElement( ggSOAPRequest::ENV_PREFIX . ':Fault' );

            $faultCodeNode = $doc->createElement( "faultcode", $this->Value->faultCode() );
            $fault->appendChild( $faultCodeNode );

            $faultStringNode = $doc->createElement( "faultstring", $this->Value->faultString() );
            $fault->appendChild( $faultStringNode );

            $body->appendChild( $fault );
        }
        else
        {
            // add the response
            $responseName = $this->Name . "Response";
            $response = $doc->createElement( $responseName );
            $response->prefix = "resp";
            $response->setAttribute( 'xmlns:' . "resp", $this->ns );

            $return = $doc->createElement( "return" );
            $return->prefix = "resp";

            $value = ggSOAPRequest::encodeValue( $doc, "return", $this->Value );

            $response->appendChild( $value );

            $body->appendChild( $response );

        }

        $doc->appendChild( $root );

        return $doc->saveXML();
    }
385571
public function build(): string
    {
        $table = $this->quoter->quoteName($this->table);

        $insert = 'INSERT';
        if (!empty($this->priority)) {
            $insert .= ' ' . $this->priority;
        }
        if (!empty($this->ignore)) {
            $insert .= ' ' . $this->ignore;
        }

        if (array_key_exists(0, $this->values)) {
            // multiple rows
            $result = sprintf('%s INTO %s (%s) VALUES', $insert, $table, $this->quoter->quoteFields($this->values[0]));
            foreach ($this->values as $key => $row) {
                $result .= sprintf('%s(%s)', ($key > 0) ? ',' : '', $this->quoter->quoteBulkValues($row));
            }
        } else {
            // single row
            $result = sprintf('%s INTO %s SET %s', $insert, $table, $this->quoter->quoteSetValues($this->values));
        }

        if ($this->duplicateValues) {
            $values = $this->quoter->quoteSetValues($this->duplicateValues);
            $result .= sprintf(' ON DUPLICATE KEY UPDATE %s', $values);
        }
        $result .= ';';

        return $result;
    }
39157
public function getPayload()
    {
        $payload = array();
        if ($this->workspaceSid) {
            $payload['workspace_sid'] = $this->workspaceSid;
        }
        if ($this->workerSid) {
            $payload['worker_sid'] = $this->workerSid;
        }
        if ($this->role) {
            $payload['role'] = $this->role;
        }

        return $payload;
    }
639277
public function build()
    {
        $streams = '';
        foreach ($this->data as $data) {
            // Add start and headers
            $streams .= "--{$this->getBoundary()}\r\n".
                $this->getHeaders($data['headers'])."\r\n";

            // Convert the stream to string
            /* @var $contentStream StreamInterface */
            $contentStream = $data['contents'];
            if ($contentStream->isSeekable()) {
                $streams .= $contentStream->__toString();
            } else {
                $streams .= $contentStream->getContents();
            }

            $streams .= "\r\n";
        }

        // Append end
        $streams .= "--{$this->getBoundary()}--\r\n";

        return $this->streamFactory->createStream($streams);
    }