PHP Class FluentDOM\Transformer\JSONx

Datei anzeigen Open project: fluentdom/fluentdom

Public Methods

Method 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

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

Method Details

__construct() public method

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

__toString() public method

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

addNode() public method

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

getDocument() public method

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