aboutsummaryrefslogtreecommitdiffstats
path: root/library/HTMLPurifier/TokenFactory.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2015-01-11 16:22:59 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2015-01-11 16:22:59 +0100
commitf0c7612bcd49d32e408e67ac1829ee891c677f7e (patch)
treed4cff4aa2d728524b631776ffffee71f42056421 /library/HTMLPurifier/TokenFactory.php
parent43f143a211c75138d09ceb89acc48ea7d5c31ca9 (diff)
parent10102ac2ac4d5b02012a9794e23656717ab05556 (diff)
downloadvolse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.tar.gz
volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.tar.bz2
volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: doc/html/classRedmatrix_1_1Import_1_1Import-members.html doc/html/classRedmatrix_1_1Import_1_1Import.js
Diffstat (limited to 'library/HTMLPurifier/TokenFactory.php')
-rw-r--r--library/HTMLPurifier/TokenFactory.php80
1 files changed, 52 insertions, 28 deletions
diff --git a/library/HTMLPurifier/TokenFactory.php b/library/HTMLPurifier/TokenFactory.php
index 7cf48fb41..dea2446b9 100644
--- a/library/HTMLPurifier/TokenFactory.php
+++ b/library/HTMLPurifier/TokenFactory.php
@@ -13,32 +13,53 @@
*/
class HTMLPurifier_TokenFactory
{
+ // p stands for prototype
/**
- * Prototypes that will be cloned.
- * @private
+ * @type HTMLPurifier_Token_Start
*/
- // p stands for prototype
- private $p_start, $p_end, $p_empty, $p_text, $p_comment;
+ private $p_start;
+
+ /**
+ * @type HTMLPurifier_Token_End
+ */
+ private $p_end;
+
+ /**
+ * @type HTMLPurifier_Token_Empty
+ */
+ private $p_empty;
+
+ /**
+ * @type HTMLPurifier_Token_Text
+ */
+ private $p_text;
+
+ /**
+ * @type HTMLPurifier_Token_Comment
+ */
+ private $p_comment;
/**
* Generates blank prototypes for cloning.
*/
- public function __construct() {
- $this->p_start = new HTMLPurifier_Token_Start('', array());
- $this->p_end = new HTMLPurifier_Token_End('');
- $this->p_empty = new HTMLPurifier_Token_Empty('', array());
- $this->p_text = new HTMLPurifier_Token_Text('');
- $this->p_comment= new HTMLPurifier_Token_Comment('');
+ public function __construct()
+ {
+ $this->p_start = new HTMLPurifier_Token_Start('', array());
+ $this->p_end = new HTMLPurifier_Token_End('');
+ $this->p_empty = new HTMLPurifier_Token_Empty('', array());
+ $this->p_text = new HTMLPurifier_Token_Text('');
+ $this->p_comment = new HTMLPurifier_Token_Comment('');
}
/**
* Creates a HTMLPurifier_Token_Start.
- * @param $name Tag name
- * @param $attr Associative array of attributes
- * @return Generated HTMLPurifier_Token_Start
+ * @param string $name Tag name
+ * @param array $attr Associative array of attributes
+ * @return HTMLPurifier_Token_Start Generated HTMLPurifier_Token_Start
*/
- public function createStart($name, $attr = array()) {
+ public function createStart($name, $attr = array())
+ {
$p = clone $this->p_start;
$p->__construct($name, $attr);
return $p;
@@ -46,10 +67,11 @@ class HTMLPurifier_TokenFactory
/**
* Creates a HTMLPurifier_Token_End.
- * @param $name Tag name
- * @return Generated HTMLPurifier_Token_End
+ * @param string $name Tag name
+ * @return HTMLPurifier_Token_End Generated HTMLPurifier_Token_End
*/
- public function createEnd($name) {
+ public function createEnd($name)
+ {
$p = clone $this->p_end;
$p->__construct($name);
return $p;
@@ -57,11 +79,12 @@ class HTMLPurifier_TokenFactory
/**
* Creates a HTMLPurifier_Token_Empty.
- * @param $name Tag name
- * @param $attr Associative array of attributes
- * @return Generated HTMLPurifier_Token_Empty
+ * @param string $name Tag name
+ * @param array $attr Associative array of attributes
+ * @return HTMLPurifier_Token_Empty Generated HTMLPurifier_Token_Empty
*/
- public function createEmpty($name, $attr = array()) {
+ public function createEmpty($name, $attr = array())
+ {
$p = clone $this->p_empty;
$p->__construct($name, $attr);
return $p;
@@ -69,10 +92,11 @@ class HTMLPurifier_TokenFactory
/**
* Creates a HTMLPurifier_Token_Text.
- * @param $data Data of text token
- * @return Generated HTMLPurifier_Token_Text
+ * @param string $data Data of text token
+ * @return HTMLPurifier_Token_Text Generated HTMLPurifier_Token_Text
*/
- public function createText($data) {
+ public function createText($data)
+ {
$p = clone $this->p_text;
$p->__construct($data);
return $p;
@@ -80,15 +104,15 @@ class HTMLPurifier_TokenFactory
/**
* Creates a HTMLPurifier_Token_Comment.
- * @param $data Data of comment token
- * @return Generated HTMLPurifier_Token_Comment
+ * @param string $data Data of comment token
+ * @return HTMLPurifier_Token_Comment Generated HTMLPurifier_Token_Comment
*/
- public function createComment($data) {
+ public function createComment($data)
+ {
$p = clone $this->p_comment;
$p->__construct($data);
return $p;
}
-
}
// vim: et sw=4 sts=4