Tag
class Tag
Constants
START_TAG |
Tag type: start tag |
END_TAG |
Tag type: end tag |
SELF_CLOSING_TAG |
Tag type: self-closing tag |
Properties
protected array | $attributes | ||
protected array | $cascade | ||
protected Tag | $endTag | ||
protected int | $flags | ||
protected bool | $invalid | ||
protected int | $len | ||
protected string | $name | ||
protected int | $pos | ||
protected int | $sortPriority | ||
protected Tag | $startTag | ||
protected int | $type |
Methods
Constructor
Add a set of flags to this tag's
Invalidate this tag, as well as tags bound to this tag
Remove a set of flags from this tag's
Set the bitfield of boolean rules that apply to this tag
Return this tag's attributes
Return the bitfield of boolean rules that apply to this tag
Return the length of text consumed by this tag
Return this tag's name
Return this tag's position
Return this tag's tiebreaker
Return this tag's start tag
Return this tag's type
Test whether this tag is a br tag
Test whether this tag is an end tag (self-closing tags inclusive)
Test whether this tag is an ignore tag
Test whether this tag is invalid
Test whether this tag represents a paragraph break
Test whether this tag is a self-closing tag
Test whether this tag is a special tag: "br", "i", "pb" or "v"
Test whether this tag is a start tag (self-closing tags inclusive)
Test whether this tag represents verbatim text
Return the value of given attribute
Return whether given attribute is set
Remove given attribute
Set the value of an attribute
Set all of this tag's attributes at once
Details
at line 91
__construct(int $type, string $name, int $pos, int $len, int $priority = 0)
Constructor
at line 110
void
addFlags(int $flags)
Add a set of flags to this tag's
at line 121
void
cascadeInvalidationTo(Tag $tag)
Set given tag to be invalidated if this tag is invalidated
at line 137
void
invalidate()
Invalidate this tag, as well as tags bound to this tag
at line 156
void
pairWith(Tag $tag)
Pair this tag with given tag
at line 175
protected bool
canBePaired(Tag $startTag, Tag $endTag)
Test whether two tags can be paired
at line 186
void
removeFlags(int $flags)
Remove a set of flags from this tag's
at line 197
void
setFlags(int $flags)
Set the bitfield of boolean rules that apply to this tag
at line 211
array
getAttributes()
Return this tag's attributes
at line 221
Tag|null
getEndTag()
Return this tag's end tag
at line 231
int
getFlags()
Return the bitfield of boolean rules that apply to this tag
at line 241
int
getLen()
Return the length of text consumed by this tag
at line 251
string
getName()
Return this tag's name
at line 261
int
getPos()
Return this tag's position
at line 271
int
getSortPriority()
Return this tag's tiebreaker
at line 281
Tag|null
getStartTag()
Return this tag's start tag
at line 291
int
getType()
Return this tag's type
at line 306
bool
canClose(Tag $startTag)
Test whether this tag can close given start tag
at line 324
bool
isBrTag()
Test whether this tag is a br tag
at line 334
bool
isEndTag()
Test whether this tag is an end tag (self-closing tags inclusive)
at line 344
bool
isIgnoreTag()
Test whether this tag is an ignore tag
at line 354
bool
isInvalid()
Test whether this tag is invalid
at line 364
bool
isParagraphBreak()
Test whether this tag represents a paragraph break
at line 374
bool
isSelfClosingTag()
Test whether this tag is a self-closing tag
at line 384
bool
isSystemTag()
Test whether this tag is a special tag: "br", "i", "pb" or "v"
at line 394
bool
isStartTag()
Test whether this tag is a start tag (self-closing tags inclusive)
at line 404
bool
isVerbatim()
Test whether this tag represents verbatim text
at line 419
mixed
getAttribute(string $attrName)
Return the value of given attribute
at line 430
bool
hasAttribute(string $attrName)
Return whether given attribute is set
at line 441
void
removeAttribute(string $attrName)
Remove given attribute
at line 453
void
setAttribute(string $attrName, string $attrValue)
Set the value of an attribute
at line 464
void
setAttributes(array $attributes)
Set all of this tag's attributes at once