aboutsummaryrefslogtreecommitdiffstats
path: root/lib/htmlpurifier/library/HTMLPurifier/TokenFactory.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-18 03:59:10 -0700
committerfriendica <info@friendica.com>2012-07-18 03:59:10 -0700
commit22cf19e174bcee88b44968f2773d1bad2da2b54d (patch)
treef4e01db6f73754418438b020c2327e18c256653c /lib/htmlpurifier/library/HTMLPurifier/TokenFactory.php
parent7a40f4354b32809af3d0cfd6e3af0eda02ab0e0a (diff)
downloadvolse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.tar.gz
volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.tar.bz2
volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.zip
bad sync with github windows client
Diffstat (limited to 'lib/htmlpurifier/library/HTMLPurifier/TokenFactory.php')
-rw-r--r--lib/htmlpurifier/library/HTMLPurifier/TokenFactory.php94
1 files changed, 0 insertions, 94 deletions
diff --git a/lib/htmlpurifier/library/HTMLPurifier/TokenFactory.php b/lib/htmlpurifier/library/HTMLPurifier/TokenFactory.php
deleted file mode 100644
index 7cf48fb41..000000000
--- a/lib/htmlpurifier/library/HTMLPurifier/TokenFactory.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-/**
- * Factory for token generation.
- *
- * @note Doing some benchmarking indicates that the new operator is much
- * slower than the clone operator (even discounting the cost of the
- * constructor). This class is for that optimization.
- * Other then that, there's not much point as we don't
- * maintain parallel HTMLPurifier_Token hierarchies (the main reason why
- * you'd want to use an abstract factory).
- * @todo Port DirectLex to use this
- */
-class HTMLPurifier_TokenFactory
-{
-
- /**
- * Prototypes that will be cloned.
- * @private
- */
- // p stands for prototype
- private $p_start, $p_end, $p_empty, $p_text, $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('');
- }
-
- /**
- * Creates a HTMLPurifier_Token_Start.
- * @param $name Tag name
- * @param $attr Associative array of attributes
- * @return Generated HTMLPurifier_Token_Start
- */
- public function createStart($name, $attr = array()) {
- $p = clone $this->p_start;
- $p->__construct($name, $attr);
- return $p;
- }
-
- /**
- * Creates a HTMLPurifier_Token_End.
- * @param $name Tag name
- * @return Generated HTMLPurifier_Token_End
- */
- public function createEnd($name) {
- $p = clone $this->p_end;
- $p->__construct($name);
- return $p;
- }
-
- /**
- * Creates a HTMLPurifier_Token_Empty.
- * @param $name Tag name
- * @param $attr Associative array of attributes
- * @return Generated HTMLPurifier_Token_Empty
- */
- public function createEmpty($name, $attr = array()) {
- $p = clone $this->p_empty;
- $p->__construct($name, $attr);
- return $p;
- }
-
- /**
- * Creates a HTMLPurifier_Token_Text.
- * @param $data Data of text token
- * @return Generated HTMLPurifier_Token_Text
- */
- public function createText($data) {
- $p = clone $this->p_text;
- $p->__construct($data);
- return $p;
- }
-
- /**
- * Creates a HTMLPurifier_Token_Comment.
- * @param $data Data of comment token
- * @return Generated HTMLPurifier_Token_Comment
- */
- public function createComment($data) {
- $p = clone $this->p_comment;
- $p->__construct($data);
- return $p;
- }
-
-}
-
-// vim: et sw=4 sts=4