rss::element PHP Méthode

element() private méthode

private element ( $name, $value = null, $attributes = [] )
    private function element($name, $value = null, $attributes = array())
    {
        $element = $this->document->createElement($name);
        if (is_null($value) === false) {
            $text = $this->document->createTextNode($value);
            $element->appendChild($text);
        }
        foreach ($attributes as $key => $val) {
            $element->setAttribute($key, $val);
        }
        return $element;
    }