ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Text.php
Go to the documentation of this file.
1<?php
2
13{
14
18 public $name = '#PCDATA';
24 public $data;
31
40 public function __construct($data, $line = null, $col = null)
41 {
42 $this->data = $data;
43 $this->is_whitespace = ctype_space($data);
44 $this->line = $line;
45 $this->col = $col;
46 }
47
48 public function toNode() {
49 return new HTMLPurifier_Node_Text($this->data, $this->is_whitespace, $this->line, $this->col);
50 }
51}
52
53// vim: et sw=4 sts=4
Concrete text token class.
Definition: Text.php:13
Concrete text token class.
Definition: Text.php:13
$name
@type string
Definition: Text.php:18
$is_whitespace
@type bool
Definition: Text.php:30
__construct($data, $line=null, $col=null)
Constructor, accepts data and determines if it is whitespace.
Definition: Text.php:40
$data
@type string
Definition: Text.php:24
toNode()
Converts a token into its corresponding node.
Definition: Text.php:48
Abstract base token class that all others inherit from.
Definition: Token.php:7
$line
Line number node was on in source document.
Definition: Token.php:12
$col
Column of line node was on in source document.
Definition: Token.php:18