API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_Token_Tag Class Reference
Inheritance diagram for HTMLPurifier_Token_Tag:
Collaboration diagram for HTMLPurifier_Token_Tag:

Public Member Functions

 __construct ($name, $attr=array(), $line=null, $col=null, $armor=array())
 
 toNode ()
 
- Public Member Functions inherited from HTMLPurifier_Token
 __get ($n)
 
 position ($l=null, $c=null)
 
 rawPosition ($l, $c)
 
 toNode ()
 

Data Fields

 $is_tag = true
 
 $name
 
 $attr = array()
 
- Data Fields inherited from HTMLPurifier_Token
 $line
 
 $col
 
 $armor = array()
 
 $skip
 
 $rewind
 
 $carryover
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

Parameters
string$nameString name.
array$attrAssociative array of attributes.
int$line
int$col
array$armor

Member Function Documentation

◆ toNode()

toNode ( )

Converts a token into its corresponding node.

Reimplemented from HTMLPurifier_Token.

Reimplemented in HTMLPurifier_Token_Empty, and HTMLPurifier_Token_End.

Field Documentation

◆ $attr

$attr = array()

Associative array of the tag's attributes. @type array

◆ $is_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(). @type bool

◆ $name

$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. @type string

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