FluentDOM\Nodes\Creator::element PHP Method

element() public method

The first argument is the node name. All other arguments are flexible. - Arrays are set as attributes - Attribute and Namespace nodes are set as attributes - Nodes are appended as child nodes - FluentDOM\Appendable instances are appended - Strings or objects castable to string are appended as text nodes
public element ( string $name, $parameters ) : Element
$name string
$parameters
return FluentDOM\Element
    public function element($name, ...$parameters)
    {
        $node = $this->_document->createElement($name);
        foreach ($parameters as $parameter) {
            $node->append($parameter);
        }
        return $node;
    }