Abstract Class HTMLPurifier_Token_Tag

InheritanceHTMLPurifier_Token_Tag » HTMLPurifier_Token
SubclassesHTMLPurifier_Token_Empty, HTMLPurifier_Token_End, HTMLPurifier_Token_Start

Abstract class of a tag token (start, end or empty), and its behavior.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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

Hide inherited methods

MethodDescriptionDefined 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

$attr public property
public $attr = []
$is_tag public property

This allows us to check objects with !empty($obj->is_tag) without having to use a function call is_a().

public $is_tag true
$name public property
public $name null

Method Details

__construct() public method

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
toNode() public method

public void toNode ( )