HTMLPurifier_AttrDef Klassenreferenz

HTMLPurifier_AttrDef Klassenreferenz
Klassendiagramm für HTMLPurifier_AttrDef:

Öffentliche Methoden

 validate ($string, $config, $context)
 
 parseCDATA ($string)
 
 make ($string)
 

Datenfelder

 $minimized = false
 
 $required = false
 

Geschützte Methoden

 mungeRgb ($string)
 
 expandCSSEscape ($string)
 

Ausführliche Beschreibung

Base class for all validating attribute definitions.

This family of classes forms the core for not only HTML attribute validation, but also any sort of string that needs to be validated or cleaned (which means CSS properties and composite definitions are defined here too). Besides defining (through code) what precisely makes the string valid, subclasses are also responsible for cleaning the code if possible.

Definiert in Zeile 13 der Datei AttrDef.php.

Dokumentation der Elementfunktionen

expandCSSEscape (   $string)
protected

Parses a possibly escaped CSS string and returns the "pure" version of it.

Definiert in Zeile 96 der Datei AttrDef.php.

Benutzt HTMLPurifier_Encoder\cleanUTF8() und HTMLPurifier_Encoder\unichr().

Wird benutzt von HTMLPurifier_AttrDef_CSS_URI\validate() und HTMLPurifier_AttrDef_CSS_FontFamily\validate().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

make (   $string)

Factory method for creating this class from a string.

Parameter
string$stringString construction info
Rückgabe
HTMLPurifier_AttrDef Created AttrDef object corresponding to $string

Definiert in Zeile 72 der Datei AttrDef.php.

mungeRgb (   $string)
protected

Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work properly. THIS IS A HACK!

Parameter
string$stringa CSS colour definition
Rückgabe
string

Definiert in Zeile 87 der Datei AttrDef.php.

Wird benutzt von HTMLPurifier_AttrDef_CSS_Border\validate() und HTMLPurifier_AttrDef_CSS_Background\validate().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

parseCDATA (   $string)

Convenience method that parses a string as if it were CDATA.

This method process a string in the manner specified at http://www.w3.org/TR/html4/types.html#h-6.2 by removing leading and trailing whitespace, ignoring line feeds, and replacing carriage returns and tabs with spaces. While most useful for HTML attributes specified as CDATA, it can also be applied to most CSS values.

Zu beachten
This method is not entirely standards compliant, as trim() removes more types of whitespace than specified in the spec. In practice, this is rarely a problem, as those extra characters usually have already been removed by HTMLPurifier_Encoder.
Warnung
This processing is inconsistent with XML's whitespace handling as specified by section 3.3.3 and referenced XHTML 1.0 section 4.7. However, note that we are NOT necessarily parsing XML, thus, this behavior may still be correct. We assume that newlines have been normalized.

Definiert in Zeile 60 der Datei AttrDef.php.

Wird benutzt von HTMLPurifier_AttrDef_Text\validate(), HTMLPurifier_AttrDef_CSS_TextDecoration\validate(), HTMLPurifier_AttrDef_CSS\validate(), HTMLPurifier_AttrDef_CSS_Filter\validate(), HTMLPurifier_AttrDef_CSS_URI\validate(), HTMLPurifier_AttrDef_CSS_Percentage\validate(), HTMLPurifier_AttrDef_CSS_Number\validate(), HTMLPurifier_AttrDef_CSS_Border\validate(), HTMLPurifier_AttrDef_CSS_ListStyle\validate(), HTMLPurifier_AttrDef_CSS_Length\validate(), HTMLPurifier_AttrDef_CSS_Background\validate(), HTMLPurifier_AttrDef_CSS_Font\validate(), HTMLPurifier_AttrDef_HTML_LinkTypes\validate(), HTMLPurifier_AttrDef_CSS_Multiple\validate(), HTMLPurifier_AttrDef_URI\validate(), HTMLPurifier_AttrDef_Integer\validate() und HTMLPurifier_AttrDef_CSS_BackgroundPosition\validate().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

validate (   $string,
  $config,
  $context 
)
abstract

Validates and cleans passed string according to a definition.

Parameter
string$stringString to be validated and cleaned.
HTMLPurifier_Config$configMandatory HTMLPurifier_Config object.
HTMLPurifier_Context$contextMandatory HTMLPurifier_Context object.

Dokumentation der Datenelemente

$minimized = false

Tells us whether or not an HTML attribute is minimized. Has no meaning in other contexts. bool

Definiert in Zeile 21 der Datei AttrDef.php.

$required = false

Tells us whether or not an HTML attribute is required. Has no meaning in other contexts bool

Definiert in Zeile 28 der Datei AttrDef.php.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.