FluidXml\FluidContext::setText PHP Méthode

setText() public méthode

public setText ( $text )
    public function setText($text)
    {
        foreach ($this->nodes as $n) {
            // Algorithm 1:
            $n->nodeValue = $text;
            // Algorithm 2:
            // foreach ($n->childNodes as $c) {
            //         $n->removeChild($c);
            // }
            // $n->appendChild(new \DOMText($text));
            // Algorithm 3:
            // foreach ($n->childNodes as $c) {
            //         $n->replaceChild(new \DOMText($text), $c);
            // }
        }
        return $this;
    }