PHP Class FluentDOM\Transformer\JSONx

Afficher le fichier Open project: fluentdom/fluentdom

Méthodes publiques

Méthode Description
__construct ( DOMDocument $document ) Import a DOM document and use the JsonDOM rules to convert it into JSONx.
__toString ( ) : string Create a JSONX document and return it as xml string
addNode ( Document | Element $parent, DOMElement $node, boolean $addNameAttribute = FALSE )
getDocument ( ) : Document Create and return a JSONx document.

Private Methods

Méthode Description
appendChildNodes ( DOMElement $target, DOMElement $source, boolean $addNameAttribute = FALSE )
getType ( DOMElement $node ) : string

Method Details

__construct() public méthode

Import a DOM document and use the JsonDOM rules to convert it into JSONx.
public __construct ( DOMDocument $document )
$document DOMDocument

__toString() public méthode

Create a JSONX document and return it as xml string
public __toString ( ) : string
Résultat string

addNode() public méthode

public addNode ( Document | Element $parent, DOMElement $node, boolean $addNameAttribute = FALSE )
$parent FluentDOM\Document | FluentDOM\Element
$node DOMElement
$addNameAttribute boolean

getDocument() public méthode

Create and return a JSONx document.
public getDocument ( ) : Document
Résultat FluentDOM\Document