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 55 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:
$namespace Namespace the directive is in
$name Key of directive
$default Default value of directive
$type Allowed type of the directive. See HTMLPurifier_DirectiveDef::$type for allowed values
$allow_null Whether or not to allow null values

Definiert in Zeile 90 der Datei ConfigSchema.php.

addAlias ( key,
new_key 
)

Defines a directive alias for backwards compatibility

Parameter:
$namespace 
$name Directive that will be aliased
$new_namespace 
$new_name Directive that the alias will be to

Definiert in Zeile 136 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:
$namespace Namespace of directive
$name Name of directive
$allowed Lookup array of allowed values

Definiert in Zeile 125 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:
$namespace Directive's namespace
$name Name of Directive
$aliases Hash of aliased values to the real alias

Definiert in Zeile 108 der Datei ConfigSchema.php.

static instance ( prototype = null  )  [static]

Retrieves an instance of the application-wide configuration definition.

Definiert in Zeile 69 der Datei ConfigSchema.php.

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.

Definiert in Zeile 62 der Datei ConfigSchema.php.

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 146 der Datei ConfigSchema.php.


Dokumentation der Datenelemente

$defaultPlist

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

Definiert in Zeile 17 der Datei ConfigSchema.php.

$defaults = array()

Defaults of the directives and namespaces.

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

Definiert in Zeile 12 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.

Definiert in Zeile 48 der Datei ConfigSchema.php.

$singleton [static, protected]

Application-wide singleton

Definiert in Zeile 53 der Datei ConfigSchema.php.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen