PHP Class FluentDOM\Transformer\Namespaces\Replace

Attributes and Elements without a namespace get their prefix removed. A change from no namespace to a namespace will not affect attributes.
Datei anzeigen Open project: fluentdom/fluentdom

Public Methods

Method Description
__construct ( DOMDocument $document, array $namespaces )
__toString ( ) : string Create a document with the replaced namespaces and return it as XML string.
getDocument ( ) Create a document with the replaced namespaces.

Private Methods

Method Description
getMappedNamespace ( string $namespaceUri ) : string
importAttribute ( DOMElement $parent, DOMAttr $source )
importElement ( DOMNode $parent, DOMElement $source )
importNode ( DOMNode $parent, DOMNode $source )

Method Details

__construct() public method

public __construct ( DOMDocument $document, array $namespaces )
$document DOMDocument
$namespaces array

__toString() public method

Create a document with the replaced namespaces and return it as XML string.
public __toString ( ) : string
return string

getDocument() public method

Create a document with the replaced namespaces.
public getDocument ( )