ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
TokenFactory.php
Go to the documentation of this file.
1
<?
php
2
14
class
HTMLPurifier_TokenFactory
15
{
16
// p stands for prototype
17
21
private
$p_start
;
22
26
private
$p_end
;
27
31
private
$p_empty
;
32
36
private
$p_text
;
37
41
private
$p_comment
;
42
46
public
function
__construct
()
47
{
48
$this->p_start =
new
HTMLPurifier_Token_Start
(
''
,
array
());
49
$this->p_end =
new
HTMLPurifier_Token_End
(
''
);
50
$this->p_empty =
new
HTMLPurifier_Token_Empty
(
''
,
array
());
51
$this->p_text =
new
HTMLPurifier_Token_Text
(
''
);
52
$this->p_comment =
new
HTMLPurifier_Token_Comment
(
''
);
53
}
54
61
public
function
createStart
($name, $attr =
array
())
62
{
63
$p = clone
$this->p_start
;
64
$p->__construct($name, $attr);
65
return
$p;
66
}
67
73
public
function
createEnd
($name)
74
{
75
$p = clone
$this->p_end
;
76
$p->__construct($name);
77
return
$p;
78
}
79
86
public
function
createEmpty
($name, $attr =
array
())
87
{
88
$p = clone
$this->p_empty
;
89
$p->__construct($name, $attr);
90
return
$p;
91
}
92
98
public
function
createText
(
$data
)
99
{
100
$p = clone
$this->p_text
;
101
$p->__construct(
$data
);
102
return
$p;
103
}
104
110
public
function
createComment
(
$data
)
111
{
112
$p = clone
$this->p_comment
;
113
$p->__construct(
$data
);
114
return
$p;
115
}
116
}
117
118
// vim: et sw=4 sts=4
HTMLPurifier_TokenFactory\createComment
createComment($data)
Creates a HTMLPurifier_Token_Comment.
Definition:
TokenFactory.php:110
HTMLPurifier_Token_End
Concrete end token class.
Definition:
End.php:10
HTMLPurifier_TokenFactory\createEnd
createEnd($name)
Creates a HTMLPurifier_Token_End.
Definition:
TokenFactory.php:73
HTMLPurifier_TokenFactory\$p_comment
$p_comment
HTMLPurifier_Token_Comment
Definition:
TokenFactory.php:41
HTMLPurifier_Token_Start
Concrete start token class.
Definition:
Start.php:6
HTMLPurifier_TokenFactory\$p_end
$p_end
HTMLPurifier_Token_End
Definition:
TokenFactory.php:26
HTMLPurifier_TokenFactory
Factory for token generation.
Definition:
TokenFactory.php:14
HTMLPurifier_TokenFactory\createText
createText($data)
Creates a HTMLPurifier_Token_Text.
Definition:
TokenFactory.php:98
HTMLPurifier_TokenFactory\$p_empty
$p_empty
HTMLPurifier_Token_Empty
Definition:
TokenFactory.php:31
HTMLPurifier_TokenFactory\__construct
__construct()
Generates blank prototypes for cloning.
Definition:
TokenFactory.php:46
HTMLPurifier_TokenFactory\$p_text
$p_text
HTMLPurifier_Token_Text
Definition:
TokenFactory.php:36
$data
$data
Definition:
test-settings.sample.php:14
HTMLPurifier_TokenFactory\$p_start
$p_start
HTMLPurifier_Token_Start
Definition:
TokenFactory.php:21
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
HTMLPurifier_Token_Empty
Concrete empty token class.
Definition:
Empty.php:6
php
HTMLPurifier_TokenFactory\createEmpty
createEmpty($name, $attr=array())
Creates a HTMLPurifier_Token_Empty.
Definition:
TokenFactory.php:86
HTMLPurifier_Token_Text
Concrete text token class.
Definition:
Text.php:12
HTMLPurifier_Token_Comment
Concrete comment token class.
Definition:
Comment.php:6
HTMLPurifier_TokenFactory\createStart
createStart($name, $attr=array())
Creates a HTMLPurifier_Token_Start.
Definition:
TokenFactory.php:61
libs
composer
vendor
ezyang
htmlpurifier
library
HTMLPurifier
TokenFactory.php
Generated on Fri Jan 17 2025 19:00:50 for ILIAS by
1.8.13 (using
Doxyfile
)