Méthode | Description | |
---|---|---|
__construct ( string $rootNodeName = 'response', integer | null $loadOptions = null ) | Construct new XmlEncoder and allow to change the root node element name. | |
decode ( $data, $format, array $context = [] ) | ||
encode ( $data, $format, array $context = [] ) | ||
getRootNodeName ( ) : string | Returns the root node name. | |
setRootNodeName ( string $name ) | Sets the root node name. | |
supportsDecoding ( $format ) | ||
supportsEncoding ( $format ) |
Méthode | Description | |
---|---|---|
appendCData ( DOMNode $node, string $val ) : boolean | ||
appendDocumentFragment ( DOMNode $node, DOMDocumentFragment $fragment ) : boolean | ||
appendText ( DOMNode $node, string $val ) : boolean | ||
appendXMLString ( DOMNode $node, string $val ) : boolean | ||
isElementNameValid ( string $name ) : boolean | Checks the name is a valid xml element name. |
Méthode | Description | |
---|---|---|
appendNode ( DOMNode $parentNode, array | object $data, string $nodeName, string $key = null ) : boolean | Selects the type of node to create and appends it to the parent. | |
buildXml ( DOMNode $parentNode, array | object $data, string | null $xmlRootNodeName = null ) : boolean | Parse the data and convert it to DOMElements. | |
createDomDocument ( array $context ) : DOMDocument | Create a DOM document, taking serializer options into account. | |
needsCdataWrapping ( string $val ) : boolean | Checks if a value contains any characters which would require CDATA wrapping. | |
parseXml ( DOMNode $node ) : array | string | Parse the input DOMNode into an array or a string. | |
parseXmlAttributes ( DOMNode $node ) : array | Parse the input DOMNode attributes into an array. | |
parseXmlValue ( DOMNode $node ) : array | string | Parse the input DOMNode value (content and children) into an array or a string. | |
resolveXmlRootName ( array $context = [] ) : string | Get real XML root node name, taking serializer options into account. | |
selectNodeType ( DOMNode $node, mixed $val ) : boolean | Tests the value being passed and decide what sort of element to create. |
final protected appendCData ( DOMNode $node, string $val ) : boolean | ||
$node | DOMNode | |
$val | string | |
Résultat | boolean |
final protected appendDocumentFragment ( DOMNode $node, DOMDocumentFragment $fragment ) : boolean | ||
$node | DOMNode | |
$fragment | DOMDocumentFragment | |
Résultat | boolean |
final protected appendText ( DOMNode $node, string $val ) : boolean | ||
$node | DOMNode | |
$val | string | |
Résultat | boolean |
final protected appendXMLString ( DOMNode $node, string $val ) : boolean | ||
$node | DOMNode | |
$val | string | |
Résultat | boolean |
public getRootNodeName ( ) : string | ||
Résultat | string |
final protected isElementNameValid ( string $name ) : boolean | ||
$name | string | |
Résultat | boolean |
public setRootNodeName ( string $name ) | ||
$name | string | root node name |