src/Document/AbstractNode.php
protected function addCdataNode($nodeName, $value, array $attributes = array())
    {
        // create element
        $domElement = $this->getDomElement()->ownerDocument->createElement($nodeName);
        $this->getDomElement()->appendChild($domElement);

        // create cdata
        $cdata = $this->getDomElement()->ownerDocument->createCDATASection($value);
        $domElement->appendChild($cdata);

        // add attributes
        foreach ($attributes as $attributeId => $attributeValue) {
            $domElement->setAttribute($attributeId, $attributeValue);
        }

        return $this;
    }
protected function addCdataNode($nodeName, $value, array $attributes = array())
    {
        // create element
        $domElement = $this->getDomElement()->ownerDocument->createElement($nodeName);
        $this->getDomElement()->appendChild($domElement);

        // create cdata
        $cdata = $this->getDomElement()->ownerDocument->createCDATASection($value);
        $domElement->appendChild($cdata);

        // add attributes
        foreach ($attributes as $attributeId => $attributeValue) {
            $domElement->setAttribute($attributeId, $attributeValue);
        }

        return $this;
    }
protected function addCdataNode ( $ nodeName , $ value , array $ attributes = array ( ) ) { // create element $ domElement = $ this -> getDomElement ( ) -> ownerDocument -> createElement ( $ nodeName ) ; $ this -> getDomElement ( ) -> appendChild ( $ domElement ) ; // create cdata $ cdata = $ this -> getDomElement ( ) -> ownerDocument -> createCDATASection ( $ value ) ; $ domElement -> appendChild ( $ cdata ) ; // add attributes foreach ( $ attributes as $ attributeId => $ attributeValue ) { $ domElement -> setAttribute ( $ attributeId , $ attributeValue ) ; } return $ this ; }
Append new child node to node

@param string $nodeName
@param string $value
@param array $attributes

@return $this
Append new child node to node