class Element extends SweetElement

Methods

void
normalize()

Normalize this element to match what the parser would produce

replaceTag(string $tagName, array $attributes = [])

Replace this element with a new tag

void
setMarkupEnd(string $markup)

Set the markup at the end of this element's content

void
setMarkupStart(string $markup)

Set the markup at the start of this element's content

void
unparse()

Unparse this element without removing or unparsing its descendants

void
unparseMarkupElement(string $nodeName, DOMNode|null $node)

No description

bool
attributesAreSorted()

No description

bool
shouldBeRemoved()

No description

void
sortAttributes()

No description

Details

at line 22
void normalize()

Normalize this element to match what the parser would produce

Return Value

void

at line 48
Element replaceTag(string $tagName, array $attributes = [])

Replace this element with a new tag

Parameters

string $tagName

New tag's name

array $attributes

Attributes for the new tag

Return Value

Element

Element that represents the new tag

at line 60
void setMarkupEnd(string $markup)

Set the markup at the end of this element's content

Parameters

string $markup

Return Value

void

at line 70
void setMarkupStart(string $markup)

Set the markup at the start of this element's content

Parameters

string $markup

Return Value

void

at line 82
void unparse()

Unparse this element without removing or unparsing its descendants

Any markup associated with this element will become plain text.

Return Value

void

at line 90
protected void unparseMarkupElement(string $nodeName, DOMNode|null $node)

No description

Parameters

string $nodeName
DOMNode|null $node

Return Value

void

at line 98
protected bool attributesAreSorted()

No description

Return Value

bool

at line 113
protected bool shouldBeRemoved()

No description

Return Value

bool

at line 123
protected void sortAttributes()

No description

Return Value

void