Formatting final class
Minn\Html\Tree\Formatting · public/minn/src/Minn/Html/Tree/Formatting.php · 89 lines
The list of active formatting elements, with its markers (null): the formatting elements opened since the last marker that may need reopening, three of a kind at most (the "Noah's Ark" clause).
Constants and properties
| private | array $entries |
Public
| method | push(Minn\Html\Tree\Node $node): void# | Adds a formatting element, dropping the earliest of three identical ones since the last marker. |
| method | insertMarker(): void# | Adds a marker (a cell, caption, template, applet, marquee or object opened). |
| method | clearToLastMarker(): void# | Drops entries back to and including the last marker. |
| method | remove(Minn\Html\Tree\Node $node): void# | Drops one element from the list. |
| method | contains(Minn\Html\Tree\Node $node): bool# | Whether this very element is in the list. |
| method | lastNamed(string $name): ?Minn\Html\Tree\Node# | The last HTML element of the name since the last marker. |
| method | needsReconstruction(Minn\Html\Tree\OpenElements $stack): bool# | Whether reopening would be needed: the last entry is an element no longer open. |
| method | names(): array# | The entries' names, markers left out. @return list<string> |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | sameAttributes(Minn\Html\Tree\Node $a, Minn\Html\Tree\Node $b): bool# |
Nothing matches.