This method serializes the entire notification, as it is used in the
response body.

@param Writer $writer
430839
public function xmlSerializeFull(Writer $writer)
    {
        $cs = '{'.Plugin::NS_CALENDARSERVER.'}';
        switch ($this->type) {
            case self::TYPE_LOW:
                $type = 'low';
                break;
            case self::TYPE_MEDIUM:
                $type = 'medium';
                break;
            default:
            case self::TYPE_HIGH:
                $type = 'high';
                break;
        }

        $writer->startElement($cs.'systemstatus');
        $writer->writeAttribute('type', $type);

        if ($this->description) {
            $writer->writeElement($cs.'description', $this->description);
        }
        if ($this->href) {
            $writer->writeElement('{DAV:}href', $this->href);
        }

        $writer->endElement(); // systemstatus
    }
1100890
public function write(WriterInterface $writer)
    {
        foreach ($this->childs as $table) {
            $table->write($writer);
        }

        return $this;
    }
638334
public function xmlSerializeFull(Writer $writer)
    {
        $cs = '{'.CalDAV\Plugin::NS_CALENDARSERVER.'}';

        $this->dtStamp->setTimezone(new \DateTimeZone('GMT'));
        $writer->writeElement($cs.'dtstamp', $this->dtStamp->format('Ymd\\THis\\Z'));

        $writer->startElement($cs.'invite-reply');

        $writer->writeElement($cs.'uid', $this->id);
        $writer->writeElement($cs.'in-reply-to', $this->inReplyTo);
        $writer->writeElement('{DAV:}href', $this->href);

        switch ($this->type) {
            case DAV\Sharing\Plugin::INVITE_ACCEPTED:
                $writer->writeElement($cs.'invite-accepted');
                break;
            case DAV\Sharing\Plugin::INVITE_DECLINED:
                $writer->writeElement($cs.'invite-declined');
                break;
        }

        $writer->writeElement($cs.'hosturl', [
            '{DAV:}href' => $writer->contextUri.$this->hostUrl,
            ]);

        if ($this->summary) {
            $writer->writeElement($cs.'summary', $this->summary);
        }
        $writer->endElement(); // invite-reply
    }
259982
function xmlSerialize(Writer $writer) {
        $writer->write([
            [
                'name' => Schema::CBC.'PriceAmount',
                'value' => $this->priceAmount,
                'attributes' => [
                    'currencyID' => Generator::$currencyID
                ]
            ],
            [
                'name' => Schema::CBC.'BaseQuantity',
                'value' => $this->baseQuantity,
                'attributes' => [
                    'unitCode' => $this->unitCode
                ]
            ]

        ]);
    }
744349
public function createStreamedResponse(IWriter $writer, $status = 200, $headers = array())
    {
        return new StreamedResponse(
            function () use ($writer) {
                $writer->save('php://output');
            },
            $status,
            $headers
        );
    }
629056
protected function writeHeader(BaseWriterInterface $writer): void
    {
        if ($this->hasMeta() === true) {
            $writer->setMeta($this->getMeta());
        }

        if ($this->hasJsonApiVersion() === true) {
            $writer->setJsonApiVersion($this->getJsonApiVersion());
        }

        if ($this->hasJsonApiMeta() === true) {
            $writer->setJsonApiMeta($this->getJsonApiMeta());
        }

        if ($this->hasLinks() === true) {
            $writer->setLinks($this->getLinks());
        }

        if ($this->hasProfile() === true) {
            $writer->setProfile($this->getProfile());
        }
    }
1048819
public function handle(Writer $logger)
    {
        $logger->write(
            $this->entry['level'],
            $this->entry['message'],
            $this->entry['context']
        );
    }
964547
public function serialize(): void
    {
        $this->buffer->writeUInt64($this->transaction['amount']);
        $this->buffer->writeUInt32($this->transaction['expiration'] ?? 0);
        $this->buffer->writeHex(Base58::decodeCheck($this->transaction['recipientId'])->getHex());
    }
950418
public function handleSignatures(Writer $buffer): void
    {
        if (isset($this->transaction['signature'])) {
            $buffer->writeHexBytes($this->transaction['signature']);
        }

        if (isset($this->transaction['secondSignature'])) {
            $buffer->writeHexBytes($this->transaction['secondSignature']);
        } elseif (isset($this->transaction['signSignature'])) {
            $buffer->writeHexBytes($this->transaction['signSignature']);
        }

        if (isset($this->transaction['signatures'])) {
            $buffer->writeUInt8(0xff);
            $buffer->writeHexBytes(implode('', $this->transaction['signatures']));
        }
    }
396811
final public function setOutputWriter(OutputWriter $outputWriter)
    {
        if ($outputWriter !== $this->outputWriter) {
            $this->outputWriter = $outputWriter;
            $this->consumer = null;
        }
        
        return $this;
    }
1305553
function xmlSerialize(Writer $writer) {
        $writer->write([
            Schema::CBC . 'ChargeIndicator' => $this->chargeIndicator ? 'true' : 'false',
        ]);

        if ($this->allowanceChargeReasonCode !== null) {
            $writer->write([
                Schema::CBC . 'AllowanceChargeReasonCode' => $this->allowanceChargeReasonCode
            ]);
        }

        if ($this->allowanceChargeReason !== null) {
            $writer->write([
                Schema::CBC . 'AllowanceChargeReason' => $this->allowanceChargeReason
            ]);
        }

        if ($this->multiplierFactorNumeric !== null) {
            $writer->write([
                Schema::CBC . 'MultiplierFactorNumeric' => $this->multiplierFactorNumeric
            ]);
        }

        $writer->write([
            [
                'name' => Schema::CBC . 'Amount',
                'value' => $this->amount,
                'attributes' => [
                    'currencyID' => Generator::$currencyID
                ]
            ],
        ]);
        
        if ($this->taxCategory !== null) {
            $writer->write(
                [
                    Schema::CAC . 'TaxCategory' => $this->taxCategory
                ]
            );
        }
        
        if ($this->taxTotal !== null) {
            $writer->write(
                [
                    Schema::CAC . 'TaxTotal' => $this->taxTotal
                ]
            );
        }

        if ($this->baseAmount !== null) {
            $writer->write([
                [
                    'name' => Schema::CBC . 'BaseAmount',
                    'value' => $this->baseAmount,
                    'attributes' => [
                        'currencyID' => Generator::$currencyID
                    ]
                ]
            ]);
        }
    }
84970
public function write(WriterInterface $writer)
    {
        try {
            if (strlen($category = $this->getConfig()->get(FormatterInterface::CFG_EXPORT_TABLE_CATEGORY)) && 
                $this->getCategory() != $category) {
                $status = 'skipped, not in category';
            } else {
                switch ($this->writeTable($writer)) {
                    case self::WRITE_OK:
                        $status = 'OK';
                        break;

                    case self::WRITE_EXTERNAL:
                        $status = 'skipped, marked as external';
                        break;

                    case self::WRITE_M2M:
                        $status = 'skipped, M2M table';
                        break;

                    default:
                        $status = 'unsupported';
                        break;
                }
            }
            $this->getDocument()->addLog(sprintf('* %s: %s', $this->getRawTableName(), $status));
        } catch (\Exception $e) {
            $this->getDocument()->addLog(sprintf('* %s: ERROR', $this->getRawTableName()));
            throw $e;
        }

        return $this;
    }
990519
private function addTranslations(Writer $writer)
    {
        foreach ($this->translations as $translation) {
            $writer->write([
                [
                    'name'       => 'xhtml:link',
                    'attributes' => [
                        'rel'      => 'alternate',
                        'hreflang' => $translation['hreflang'],
                        'href'     => $translation['href']
                    ],
                    'value'      => null
                ]
            ]);
        }
    }
1218342
public void serialize(Writer writer, boolean verbose) throws IOException {
        Serializer serializer;

        //Try to avoid double-buffering or buffering in-memory
        //writers.
        Class writerClass = writer.getClass();
        if (!StringWriter.class.isAssignableFrom(writerClass) &&
            !CharArrayWriter.class.isAssignableFrom(writerClass) &&
            !BufferedWriter.class.isAssignableFrom(writerClass)) {
            writer = new BufferedWriter(writer);
        }

        if (verbose)
        {
            serializer = new SerializerVerbose(writer);
        }
        else
        {
            serializer = new Serializer(writer);
        }
        serializer.writeObject(this).flush();
    }
268535
function xmlSerialize(Writer $writer) {
        $this->validate();

        $writer->write([
                [
                    'name' => Schema::CBC . 'TaxableAmount',
                    'value' => number_format($this->taxableAmount, 2, '.', ''),
                    'attributes' => [
                        'currencyID' => Generator::$currencyID
                    ]

                ],
                [
                    'name' => Schema::CBC . 'TaxAmount',
                    'value' => number_format($this->taxAmount, 2, '.', ''),
                    'attributes' => [
                        'currencyID' => Generator::$currencyID
                    ]

                ],
                Schema::CAC.'TaxCategory' => $this->taxCategory
            ]
        );
    }
341951
def Serialize(self, writer):
        
        self.SerializeUnsigned(writer)
        writer.WriteSerializableArray(self.scripts)
1222080
public function xmlSerialize(SabreWriter $writer)
    {
        // Validate the attributes and value.
        if ($this->validate() === true) {
            // Start serializing all allowed child elements
            if (empty($this->elements)) {
                if (property_exists($this, 'value')) {
                    $writer->write($this->value);
                }
            } else {
                $writer->write($this->getChildren());
            }
        } else {
            die("\nValidation on element <".$this->getShortName()."> failed, see details above.\n");
        }
    }