You are here

final protected function XmlEncoder::appendText in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Encoder/XmlEncoder.php \Symfony\Component\Serializer\Encoder\XmlEncoder::appendText()

Parameters

\DOMNode $node:

string $val:

Return value

bool

1 call to XmlEncoder::appendText()
XmlEncoder::selectNodeType in vendor/symfony/serializer/Encoder/XmlEncoder.php
Tests the value being passed and decide what sort of element to create.

File

vendor/symfony/serializer/Encoder/XmlEncoder.php, line 197

Class

XmlEncoder
Encodes XML data.

Namespace

Symfony\Component\Serializer\Encoder

Code

protected final function appendText(\DOMNode $node, $val) {
  $nodeText = $this->dom
    ->createTextNode($val);
  $node
    ->appendChild($nodeText);
  return true;
}