메소드 | 설명 | |
---|---|---|
__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 ) |
메소드 | 설명 | |
---|---|---|
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. |
메소드 | 설명 | |
---|---|---|
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 | |
리턴 | boolean |
final protected appendDocumentFragment ( DOMNode $node, DOMDocumentFragment $fragment ) : boolean | ||
$node | DOMNode | |
$fragment | DOMDocumentFragment | |
리턴 | boolean |
final protected appendText ( DOMNode $node, string $val ) : boolean | ||
$node | DOMNode | |
$val | string | |
리턴 | boolean |
final protected appendXMLString ( DOMNode $node, string $val ) : boolean | ||
$node | DOMNode | |
$val | string | |
리턴 | boolean |
final protected isElementNameValid ( string $name ) : boolean | ||
$name | string | |
리턴 | boolean |
public setRootNodeName ( string $name ) | ||
$name | string | root node name |