HTMLPurifier_Token_Tag
Abstract class of a tag token (start, end or empty), and its behavior.
- Full name:
\HTMLPurifier_Token_Tag
- Parent class:
\HTMLPurifier_Token
- This class is an Abstract class
Properties
is_tag
Static bool marker that indicates the class is a tag.
This allows us to check objects with !empty($obj->is_tag) without having to use a function call is_a().
name
The lower-case name of the tag, like 'a', 'b' or 'blockquote'.
attr
Associative array of the tag's attributes.
Methods
__construct
Non-overloaded constructor, which lower-cases passed tag name.
public __construct(string $name, array $attr = array(), int $line = null, int $col = null, array $armor = array()): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string | String name. |
$attr |
array | Associative array of attributes. |
$line |
int | |
$col |
int | |
$armor |
array |
toNode
Converts a token into its corresponding node.
Inherited methods
__get
Parameters:
Parameter | Type | Description |
---|---|---|
$n |
string |
position
Sets the position of the token in the source document.
Parameters:
Parameter | Type | Description |
---|---|---|
$l |
int | |
$c |
int |
rawPosition
Convenience function for DirectLex settings line/col position.
Parameters:
Parameter | Type | Description |
---|---|---|
$l |
int | |
$c |
int |
toNode
Converts a token into its corresponding node.
- This method is abstract.
Automatically generated on 2025-03-18