HTMLPurifier 4.4.0
HTMLPurifier_Token_Tag Class Reference

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

Inheritance diagram for HTMLPurifier_Token_Tag:
HTMLPurifier_Token HTMLPurifier_Token HTMLPurifier_Token_Empty HTMLPurifier_Token_Empty HTMLPurifier_Token_End HTMLPurifier_Token_End HTMLPurifier_Token_Start HTMLPurifier_Token_Start

List of all members.

Public Member Functions

 __construct ($name, $attr=array(), $line=null, $col=null, $armor=array())
 Non-overloaded constructor, which lower-cases passed tag name.
 __construct ($name, $attr=array(), $line=null, $col=null, $armor=array())
 Non-overloaded constructor, which lower-cases passed tag name.

Public Attributes

 $is_tag = true
 Static bool marker that indicates the class is a tag.
 $name
 The lower-case name of the tag, like 'a', 'b' or 'blockquote'.
 $attr = array()
 Associative array of the tag's attributes.

Detailed Description

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

Definition at line 6 of file Tag.php.


Constructor & Destructor Documentation

HTMLPurifier_Token_Tag::__construct ( name,
attr = array(),
line = null,
col = null,
armor = array() 
)

Non-overloaded constructor, which lower-cases passed tag name.

Parameters:
$nameString name.
$attrAssociative array of attributes.

Definition at line 36 of file Tag.php.

References HTMLPurifier_Token::$armor, $attr, HTMLPurifier_Token::$col, HTMLPurifier_Token::$line, and $name.

HTMLPurifier_Token_Tag::__construct ( name,
attr = array(),
line = null,
col = null,
armor = array() 
)

Non-overloaded constructor, which lower-cases passed tag name.

Parameters:
$nameString name.
$attrAssociative array of attributes.

Definition at line 16743 of file HTMLPurifier.standalone.php.

References HTMLPurifier_Token::$armor, $attr, HTMLPurifier_Token::$col, HTMLPurifier_Token::$line, and $name.


Member Data Documentation

HTMLPurifier_Token_Tag::$attr = array()

Associative array of the tag's attributes.

Definition at line 28 of file Tag.php.

Referenced by __construct().

HTMLPurifier_Token_Tag::$is_tag = true

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().

Definition at line 14 of file Tag.php.

HTMLPurifier_Token_Tag::$name

The lower-case name of the tag, like 'a', 'b' or 'blockquote'.

Note:
Strictly speaking, XML tags are case sensitive, so we shouldn't be lower-casing them, but these tokens cater to HTML tags, which are insensitive.

Definition at line 23 of file Tag.php.

Referenced by __construct().


The documentation for this class was generated from the following files: