ElementInspector
class ElementInspector
Properties
static protected array | $htmlElements | This is an abridged version of the HTML5 content models and rules, with some liberties taken. |
Methods
Test whether given child element closes given parent element
Return the "denyDescendant" bitfield for given element
Test whether given element preserves whitespace in its content
Evaluate an XPath query using given element as context node
Test whether given element has given property in context
Convert a raw string to a series of 0 and 1 in LSB order
Convert a series of 0 and 1 in LSB order to a raw string
Details
at line 180
static bool
closesParent(DOMElement $child, DOMElement $parent)
Test whether given child element closes given parent element
at line 194
static bool
disallowsText(DOMElement $element)
Test whether given element disallows text nodes
at line 205
static string
getAllowChildBitfield(DOMElement $element)
Return the "allowChild" bitfield for given element
at line 216
static string
getCategoryBitfield(DOMElement $element)
Return the "category" bitfield for given element
at line 227
static string
getDenyDescendantBitfield(DOMElement $element)
Return the "denyDescendant" bitfield for given element
at line 238
static bool
isBlock(DOMElement $element)
Test whether given element is a block element
at line 249
static bool
isEmpty(DOMElement $element)
Test whether given element uses the empty content model
at line 260
static bool
isFormattingElement(DOMElement $element)
Test whether given element is a formatting element
at line 271
static bool
isTextOnly(DOMElement $element)
Test whether given element only accepts text nodes
at line 282
static bool
isTransparent(DOMElement $element)
Test whether given element uses the transparent content model
at line 293
static bool
isVoid(DOMElement $element)
Test whether given element uses the void content model
at line 304
static bool
preservesWhitespace(DOMElement $element)
Test whether given element preserves whitespace in its content
at line 316
static protected bool
evaluate(string $query, DOMElement $element)
Evaluate an XPath query using given element as context node
at line 330
static protected string
getBitfield(DOMElement $element, string $name)
Get the bitfield value for a given element
at line 357
static protected array
getProperties(DOMElement $element)
Return the properties associated with given element
Returns span's properties if the element is not defined
at line 369
static protected bool
hasProperty(DOMElement $element, string $propName)
Test whether given element has given property in context
at line 382
static protected string
toBin(string $raw)
Convert a raw string to a series of 0 and 1 in LSB order
at line 399
static protected string
toRaw(string $bin)
Convert a series of 0 and 1 in LSB order to a raw string