Abstract Class HTMLPurifier_Token_Tag
Inheritance | HTMLPurifier_Token_Tag » HTMLPurifier_Token |
---|---|
Subclasses | HTMLPurifier_Token_Empty, HTMLPurifier_Token_End, HTMLPurifier_Token_Start |
Abstract class of a tag token (start, end or empty), and its behavior.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$armor | Lookup array of processing that this token is exempt from. | HTMLPurifier_Token | |
$attr | Associative array of the tag's attributes. | HTMLPurifier_Token_Tag | |
$carryover | HTMLPurifier_Token | ||
$col | Column of line node was on in source document. Null if unknown. | HTMLPurifier_Token | |
$is_tag | Static bool marker that indicates the class is a tag. | HTMLPurifier_Token_Tag | |
$line | Line number node was on in source document. Null if unknown. | HTMLPurifier_Token | |
$name | The lower-case name of the tag, like 'a', 'b' or 'blockquote'. | HTMLPurifier_Token_Tag | |
$rewind | HTMLPurifier_Token | ||
$skip | Used during MakeWellFormed. | HTMLPurifier_Token |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Non-overloaded constructor, which lower-cases passed tag name. | HTMLPurifier_Token_Tag |
__get() | HTMLPurifier_Token | |
position() | Sets the position of the token in the source document. | HTMLPurifier_Token |
rawPosition() | Convenience function for DirectLex settings line/col position. | HTMLPurifier_Token |
toNode() | HTMLPurifier_Token_Tag |
Property Details
This allows us to check objects with !empty($obj->is_tag) without having to use a function call is_a().
Method Details
Non-overloaded constructor, which lower-cases passed tag name.
public void __construct ( $name, $attr = [], $line = null, $col = null, $armor = [] ) | ||
$name | string | String name. |
$attr | array | Associative array of attributes. |
$line | int | |
$col | int | |
$armor | array |
public void toNode ( ) |