The classes in this library follow a few naming conventions, which may
+help you find the correct functionality more quickly. Here they are:
+
+
+
+
All classes occupy the HTMLPurifier pseudo-namespace.
+
This means that all classes are prefixed with HTMLPurifier_. As such, all
+ names under HTMLPurifier_ are reserved. I recommend that you use the name
+ HTMLPurifierX_YourName_ClassName, especially if you want to take advantage
+ of HTMLPurifier_ConfigDef.
+
+
All classes correspond to their path if library/ was in the include path
+
HTMLPurifier_AttrDef is located at HTMLPurifier/AttrDef.php; replace
+ underscores with slashes and append .php and you'll have the location of
+ the class.
+
+
Harness and Test are reserved class names for unit tests
+
The suffix Test indicates that the class is a subclass of UnitTestCase
+ (of the Simpletest library) and is testable. "Harness" indicates a subclass
+ of UnitTestCase that is not meant to be run but to be extended into
+ concrete test cases and contains custom test methods (i.e. assert*())
+
+
Class names do not necessarily represent inheritance hierarchies
+
While we try to reflect inheritance in naming to some extent, it is not
+ guaranteed (for instance, none of the classes inherit from HTMLPurifier,
+ the base class). However, all class files have the require_once
+ declarations to whichever classes they are tightly coupled to.
+
+
Strategy has a meaning different from the Gang of Four pattern
+
In Design Patterns, the Gang of Four describes a Strategy object as
+ encapsulating an algorithm so that they can be switched at run-time. While
+ our strategies are indeed algorithms, they are not meant to be substituted:
+ all must be present in order for proper functioning.
+
+
Abbreviations are avoided
+
We try to avoid abbreviations as much as possible, but in some cases,
+ abbreviated version is more readable than the full version. Here, we
+ list common abbreviations:
+
+
Attr(s) to Attribute(s)
+
Def to Definition
+
+
+
+
Ambiguity concerning the definition of Def/Definition
+
While a definition normally defines the structure/acceptable values of
+ an entity, most of the definitions in this application also attempt
+ to validate and fix the value. I am unsure of a better name, as
+ "Validator" would exclude fixing the value, "Fixer" doesn't invoke
+ the proper image of "fixing" something, and "ValidatorFixer" is too long!
+ Some other suggestions were "Handler", "Reference", "Check", "Fix",
+ "Repair" and "Heal".
+
+
Transform not Transformer
+
Transform is both a noun and a verb, and thus we define a "Transform" as
+ something that "transforms," leaving "Transformer" (which sounds like an
+ electrical device/robot toy).
+
+
+
+
$Id$
+
+
\ No newline at end of file
diff --git a/docs/dev-naming.txt b/docs/dev-naming.txt
deleted file mode 100644
index 2be60698..00000000
--- a/docs/dev-naming.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-
-Naming
-
-The classes in this library follow a few naming conventions, which may
-help you find the correct functionality more quickly. Here they are:
-
-All classes occupy the HTMLPurifier pseudo-namespace.
- This means that all classes are prefixed with HTMLPurifier_. As such, all
- names under HTMLPurifier_ are reserved. I recommend that you use the name
- HTMLPurifierX_YourName_ClassName, especially if you want to take advantage
- of HTMLPurifier_ConfigDef.
-
-All classes correspond to their path if library/ was in the include path
- HTMLPurifier_AttrDef is located at HTMLPurifier/AttrDef.php; replace
- underscores with slashes and append .php and you'll have the location of
- the class.
-
-Harness and Test are reserved class names for unit tests
- The suffix "Test" indicates that the class is a subclass of UnitTestCase
- (of the Simpletest library) and is testable. "Harness" indicates a subclass
- of UnitTestCase that is not meant to be run but to be extended into
- concrete test cases and contains custom test methods (i.e. assert*())
-
-Class names do not necessarily represent inheritance hierarchies
- While we try to reflect inheritance in naming to some extent, it is not
- guaranteed (for instance, none of the classes inherit from HTMLPurifier,
- the base class). However, all class files have the require_once
- declarations to whichever classes they are tightly coupled to.
-
-Strategy has a meaning different from the Gang of Four pattern
- In Design Patterns, the Gang of Four describes a Strategy object as
- encapsulating an algorithm so that they can be switched at run-time. While
- our strategies are indeed algorithms, they are not meant to be substituted:
- all must be present in order for proper functioning.
-
-Abbreviations are avoided
- We try to avoid abbreviations as much as possible, but in some cases,
- abbreviated version is more readable than the full version. Here, we
- list common abbreviations:
- Attr(s) -> Attribute(s)
- Def -> Definition
-
-Ambiguity concerning the definition of Def/Definition
- While a definition normally defines the structure/acceptable values of
- an entity, most of the definitions in this application also attempt
- to validate and fix the value. I am unsure of a better name, as
- "Validator" would exclude fixing the value, "Fixer" doesn't invoke
- the proper image of "fixing" something, and "ValidatorFixer" is too long!
- Some other suggestions were "Handler", "Reference", "Check", "Fix",
- "Repair" and "Heal".
-
-Transform not Transformer
- Transform is both a noun and a verb, and thus we define a "Transform" as
- something that "transforms," leaving "Transformer" (which sounds like an
- electrical device/robot toy).
-
diff --git a/docs/dev-optimization.html b/docs/dev-optimization.html
new file mode 100644
index 00000000..2238b815
--- /dev/null
+++ b/docs/dev-optimization.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+Optimization - HTML Purifier
+
+
+
+
Here are some possible optimization techniques we can apply to code sections if
+they turn out to be slow. Be sure not to prematurely optimize: if you get
+that itch, put it here!
+
+
+
Make Tokens Flyweights (may prove problematic, probably not worth it)
+
Rewrite regexps into PHP code
+
Serialize the Definition object
+
Batch regexp validation (do as many per function call as possible)
+
Parallelize strategies
+
+
+
$Id$
+
+
\ No newline at end of file
diff --git a/docs/dev-optimization.txt b/docs/dev-optimization.txt
deleted file mode 100644
index 49a51794..00000000
--- a/docs/dev-optimization.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-Optimization
-
-Here are some possible optimization techniques we can apply to code sections if
-they turn out to be slow. Be sure not to prematurely optimize: if you get
-that itch, put it here!
-
- - Make Tokens Flyweights (may prove problematic, probably not worth it)
- - Rewrite regexps into PHP code
- - Serialize the Definition object
- - Batch regexp validation (do as many per function call as possible)
- - Parallelize strategies
diff --git a/docs/dev-progress.html b/docs/dev-progress.html
index 17a336b8..593498bd 100644
--- a/docs/dev-progress.html
+++ b/docs/dev-progress.html
@@ -44,7 +44,7 @@ thead th {text-align:left;padding:0.1em;background-color:#EEE;}
Feature, requires extra work
-
CSS
+
CSS
diff --git a/docs/index.html b/docs/index.html
index 672ede35..854e189c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -25,10 +25,19 @@ information for casual developers using HTML Purifier.
conventions.
Discusses possible methods of optimizing HTML Purifier.
+
Proposals
diff --git a/docs/ref-devnetwork.html b/docs/ref-devnetwork.html
index f1c1e58d..81f42c07 100644
--- a/docs/ref-devnetwork.html
+++ b/docs/ref-devnetwork.html
@@ -5,7 +5,6 @@
-DevNetwork Credits - HTML Purifier
@@ -22,20 +21,20 @@ theorizing about design, and offering encouragement during
the development of this library in these forum threads: