FluidXml\FluidXml::dom PHP Method

dom() public method

public dom ( )
    public function dom()
    {
        return $this->document->dom;
    }

Usage Example

Example #1
0
     \assert($actual === $expected, __($actual, $expected));
 });
 it('should accept an array of DOMNode', function () {
     $xml = new FluidXml();
     $cx = $xml->appendChild(['head', 'body'], true);
     $doc = new FluidDocument();
     $handler = new FluidInsertionHandler($doc);
     $new_cx = new FluidContext($doc, $handler, $cx->asArray());
     $actual = $new_cx->asArray();
     $expected = $cx->asArray();
     \assert($actual === $expected, __($actual, $expected));
 });
 it('should accept a DOMNodeList', function () {
     $xml = new FluidXml();
     $cx = $xml->appendChild(['head', 'body'], true);
     $dom = $xml->dom();
     $domxp = new \DOMXPath($dom);
     $nodes = $domxp->query('/doc/*');
     $doc = new FluidDocument();
     $handler = new FluidInsertionHandler($doc);
     $new_cx = new FluidContext($doc, $handler, $nodes);
     $actual = $new_cx->asArray();
     $expected = $cx->asArray();
     \assert($actual === $expected, __($actual, $expected));
 });
 it('should accept a FluidContext', function () {
     $xml = new FluidXml();
     $cx = $xml->appendChild(['head', 'body'], true);
     $doc = new FluidDocument();
     $handler = new FluidInsertionHandler($doc);
     $new_cx = new FluidContext($doc, $handler, $cx);
All Usage Examples Of FluidXml\FluidXml::dom