- author Jordi Boggiano
- author John Wards
- author Fabian Vogler
- author Kévin Dunglas
- author Dany Maillard
Constants |
public Symfony |
public Symfony An array of ignored XML node types while decoding, each one of the DOM Predefined XML_* constants. |
public Symfony An array of ignored XML node types while encoding, each one of the DOM Predefined XML_* constants. |
public Symfony |
public Symfony |
public Symfony |
public Symfony A bit field of LIBXML_* constants for loading XML documents. |
public Symfony |
public Symfony |
public Symfony A bit field of LIBXML_* constants for saving XML documents. |
public Symfony |
public Symfony |
public Symfony |
Methods |
public __construct(array $defaultContext = []) |
public decode(string $data, string $format, array $context = []) : ?mixed |
public encode(?mixed $data, string $format, array $context = []) : string |
public setSerializer(Symfony
|
public supportsDecoding(string $format) : bool |
public supportsEncoding(string $format) : bool |
Properties |
protected $serializer = NULL
|
Methods |
protected final appendCData(DOMNode $node, string $val) : bool |
protected final appendComment(DOMNode $node, string $data) : bool |
protected final appendDocumentFragment(DOMNode $node, DOMDocumentFragment $fragment) : bool |
protected final appendText(DOMNode $node, string $val) : bool |
protected final appendXMLString(DOMNode $node, string $val) : bool |
protected final isElementNameValid(string $name) : bool Checks the name is a valid xml element name. |
Properties |
private array $defaultContext = ['as_collection' => false, 'decoder_ignored_node_types' => [7, 8], 'encoder_ignored_node_types' => [], 'load_options' => 2304, 'save_options' => 0, 'remove_empty_tags' => false, 'xml_root_node_name' => 'response', 'xml_type_cast_attributes' => true] |
Methods |
private appendNode(DOMNode $parentNode, ?mixed $data, string $format, array $context, string $nodeName, ?string $key = NULL) : bool Selects the type of node to create and appends it to the parent. |
private buildXml(DOMNode $parentNode, ?mixed $data, string $format, array $context, ?string $xmlRootNodeName = NULL) : bool Parse the data and convert it to DOMElements.
|
private createDomDocument(array $context) : DOMDocument Create a DOM document, taking serializer options into account. |
private needsCdataWrapping(string $val) : bool Checks if a value contains any characters which would require CDATA wrapping. |
private parseXml(DOMNode $node, array $context = []) : array|string Parse the input DOMNode into an array or a string. |
private parseXmlAttributes(DOMNode $node, array $context = []) : array Parse the input DOMNode attributes into an array. |
private parseXmlValue(DOMNode $node, array $context = []) : array|string Parse the input DOMNode value (content and children) into an array or a string. |
private selectNodeType(DOMNode $node, ?mixed $val, string $format, array $context) : bool Tests the value being passed and decide what sort of element to create.
|