Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

PHP DOM Builder API 2.0

PHP DOM Builder is unveiled in second revision

In 2014 year PHP DOM Builder library was unveiled at the first time within the framework of Baigudin Software project. Two years have been left after that moment and today we are glad to offer the second generation that is PHP DOM Builder Revision 2.

Interface «DomBuilder\Api\Builder»

Elements tree builder access declaration.

  • interface Api\Builder

All superinterfaces:

Object

public Element|false after(string|Element $node);

Inserts an element after each element.

Parameters:
string|Element $node — a string that contains a tag name of new element or an element.

Returns:
Element|false — new inserted element.

public Element|false before(string|Element $node);

Inserts an element before each element.

Parameters:
string|Element $node — a string that contains a tag name of new element or an element.

Returns:
Element|false — new inserted element.

public Element|false insert(string|Element $node);

Inserts an element as the last child of each element.

Parameters:
string|Element $node — a string that contains a tag name of new element or an element.

Returns:
Element|false — new inserted element.

public Element|false prepend(string|Element $node);

Inserts an element as the first child of each element.

Parameters:
string|Element $node — a string that contains a tag name of new element or an element.

Returns:
Element|false — new inserted element.

public Element remove();

Removes each element.

Returns:
Element — removed elements.

Back to class list