1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-03 20:58:11 +02:00

Document core classes up to EntityLookup.php

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@304 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-19 23:06:59 +00:00
parent 973cc43b64
commit 37cbdc25b1
5 changed files with 180 additions and 12 deletions

View File

@@ -9,11 +9,24 @@ require_once 'HTMLPurifier/AttrDef/Multiple.php';
require_once 'HTMLPurifier/AttrDef/TextDecoration.php';
require_once 'HTMLPurifier/AttrDef/FontFamily.php';
/**
* Defines allowed CSS attributes and what their values are.
* @see HTMLPurifier_HTMLDefinition
*/
class HTMLPurifier_CSSDefinition
{
/**
* Assoc array of attribute name to definition object.
*/
var $info = array();
/**
* Returns sole instance of this definition.
* @param $prototype Optional prototype you may pass in to overload
* the sole instance. Good for replacing an instance of
* the object with your own, custom object.
*/
function &instance($prototype = null) {
static $instance = null;
if ($prototype) {
@@ -25,8 +38,9 @@ class HTMLPurifier_CSSDefinition
return $instance;
}
function HTMLPurifier_CSSDefinition() {}
/**
* Constructs the info array. The meat of this class.
*/
function setup() {
$this->info['text-align'] = new HTMLPurifier_AttrDef_Enum(