HTMLPurifier_ConfigSchema Klassenreferenz

Öffentliche Methoden

 __construct ()
 
 add ($key, $default, $type, $allow_null)
 
 addValueAliases ($key, $aliases)
 
 addAllowedValues ($key, $allowed)
 
 addAlias ($key, $new_key)
 
 postProcess ()
 

Öffentliche, statische Methoden

static makeFromSerial ()
 
static instance ($prototype=null)
 

Datenfelder

 $defaults = array()
 
 $defaultPlist
 
 $info = array()
 

Statische, geschützte Attribute

static $singleton
 

Ausführliche Beschreibung

Configuration definition, defines directives and their defaults.

Definiert in Zeile 6 der Datei ConfigSchema.php.

Beschreibung der Konstruktoren und Destruktoren

__construct ( )

Definiert in Zeile 60 der Datei ConfigSchema.php.

Dokumentation der Elementfunktionen

add (   $key,
  $default,
  $type,
  $allow_null 
)

Defines a directive for configuration

Warnung
Will fail of directive's namespace is defined.
This method's signature is slightly different from the legacy define() static method! Beware!
Parameter
string$keyName of directive
mixed$defaultDefault value of directive
string$typeAllowed type of the directive. See HTMLPurifier_DirectiveDef::$type for allowed values
bool$allow_nullWhether or not to allow null values

Definiert in Zeile 106 der Datei ConfigSchema.php.

Benutzt HTMLPurifier_VarParser\$types.

addAlias (   $key,
  $new_key 
)

Defines a directive alias for backwards compatibility

Parameter
string$keyDirective that will be aliased
string$new_keyDirective that the alias will be to

Definiert in Zeile 153 der Datei ConfigSchema.php.

addAllowedValues (   $key,
  $allowed 
)

Defines a set of allowed values for a directive.

Warnung
This is slightly different from the corresponding static method definition.
Parameter
string$keyName of directive
array$allowedLookup array of allowed values

Definiert in Zeile 143 der Datei ConfigSchema.php.

addValueAliases (   $key,
  $aliases 
)

Defines a directive value alias.

Directive value aliases are convenient for developers because it lets them set a directive to several values and get the same result.

Parameter
string$keyName of Directive
array$aliasesHash of aliased values to the real alias

Definiert in Zeile 126 der Datei ConfigSchema.php.

static instance (   $prototype = null)
static

Retrieves an instance of the application-wide configuration definition.

Parameter
HTMLPurifier_ConfigSchema$prototype
Rückgabe
HTMLPurifier_ConfigSchema

Definiert in Zeile 85 der Datei ConfigSchema.php.

Benutzt $singleton und makeFromSerial().

Wird benutzt von HTMLPurifier_Config\createDefault() und HTMLPurifier_Config\getAllowedDirectivesForForm().

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

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

static makeFromSerial ( )
static

Unserializes the default ConfigSchema.

Rückgabe
HTMLPurifier_ConfigSchema

Definiert in Zeile 69 der Datei ConfigSchema.php.

Wird benutzt von instance().

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

postProcess ( )

Replaces any stdclass that only has the type property with type integer.

Definiert in Zeile 164 der Datei ConfigSchema.php.

Dokumentation der Datenelemente

$defaultPlist

The default property list. Do not edit this property list. array

Definiert in Zeile 19 der Datei ConfigSchema.php.

$defaults = array()

Defaults of the directives and namespaces. array

Zu beachten
This shares the exact same structure as HTMLPurifier_Config::$conf

Definiert in Zeile 13 der Datei ConfigSchema.php.

$info = array()

Definition of the directives. The structure of this is:

array( 'Namespace' => array( 'Directive' => new stdclass(), ) )

The stdclass may have the following properties:

  • If isAlias isn't set:
    • type: Integer type of directive, see HTMLPurifier_VarParser for definitions
    • allow_null: If set, this directive allows null values
    • aliases: If set, an associative array of value aliases to real values
    • allowed: If set, a lookup array of allowed (string) values
  • If isAlias is set:
    • namespace: Namespace this directive aliases to
    • name: Directive name this directive aliases to

In certain degenerate cases, stdclass will actually be an integer. In that case, the value is equivalent to an stdclass with the type property set to the integer. If the integer is negative, type is equal to the absolute value of integer, and allow_null is true.

This class is friendly with HTMLPurifier_Config. If you need introspection about the schema, you're better of using the ConfigSchema_Interchange, which uses more memory but has much richer information. array

Definiert in Zeile 52 der Datei ConfigSchema.php.

$singleton
staticprotected

Application-wide singleton HTMLPurifier_ConfigSchema

Definiert in Zeile 58 der Datei ConfigSchema.php.

Wird benutzt von instance().


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.