Public Member Functions | |
| add ($namespace, $name, $default, $type, $allow_null) | |
| Defines a directive for configuration. | |
| addNamespace ($namespace) | |
| Defines a namespace for directives to be put into. | |
| addValueAliases ($namespace, $name, $aliases) | |
| Defines a directive value alias. | |
| addAllowedValues ($namespace, $name, $allowed) | |
| Defines a set of allowed values for a directive. | |
| addAlias ($namespace, $name, $new_namespace, $new_name) | |
| Defines a directive alias for backwards compatibility. | |
| postProcess () | |
| Replaces any stdclass that only has the type property with type integer. | |
| validate ($a, $b, $c=false) | |
| add ($namespace, $name, $default, $type, $allow_null) | |
| Defines a directive for configuration. | |
| addNamespace ($namespace) | |
| Defines a namespace for directives to be put into. | |
| addValueAliases ($namespace, $name, $aliases) | |
| Defines a directive value alias. | |
| addAllowedValues ($namespace, $name, $allowed) | |
| Defines a set of allowed values for a directive. | |
| addAlias ($namespace, $name, $new_namespace, $new_name) | |
| Defines a directive alias for backwards compatibility. | |
| postProcess () | |
| Replaces any stdclass that only has the type property with type integer. | |
| validate ($a, $b, $c=false) | |
Static Public Member Functions | |
| static | makeFromSerial () |
| Unserializes the default ConfigSchema. | |
| static | instance ($prototype=null) |
| Retrieves an instance of the application-wide configuration definition. | |
| static | define ($namespace, $name, $default, $type, $description) |
| |
| static | defineNamespace ($namespace, $description) |
| |
| static | defineValueAliases ($namespace, $name, $aliases) |
| |
| static | defineAllowedValues ($namespace, $name, $allowed_values) |
| |
| static | defineAlias ($namespace, $name, $new_namespace, $new_name) |
| |
| static | makeFromSerial () |
| Unserializes the default ConfigSchema. | |
| static | instance ($prototype=null) |
| Retrieves an instance of the application-wide configuration definition. | |
| static | define ($namespace, $name, $default, $type, $description) |
| |
| static | defineNamespace ($namespace, $description) |
| |
| static | defineValueAliases ($namespace, $name, $aliases) |
| |
| static | defineAllowedValues ($namespace, $name, $allowed_values) |
| |
| static | defineAlias ($namespace, $name, $new_namespace, $new_name) |
| |
Public Attributes | |
| $defaults = array() | |
| Defaults of the directives and namespaces. | |
| $info = array() | |
| Definition of the directives. | |
Static Protected Attributes | |
| static | $singleton |
| Application-wide singleton. | |
Static Private Member Functions | |
| static | deprecated ($method) |
| Throws an E_USER_NOTICE stating that a method is deprecated. | |
| static | deprecated ($method) |
| Throws an E_USER_NOTICE stating that a method is deprecated. | |
Definition at line 6 of file ConfigSchema.php.
| static HTMLPurifier_ConfigSchema::makeFromSerial | ( | ) | [static] |
Unserializes the default ConfigSchema.
Definition at line 53 of file ConfigSchema.php.
Referenced by instance().
| static HTMLPurifier_ConfigSchema::instance | ( | $ | prototype = null |
) | [static] |
Retrieves an instance of the application-wide configuration definition.
Definition at line 60 of file ConfigSchema.php.
References $singleton, and makeFromSerial().
Referenced by HTMLPurifier_Config::createDefault(), define(), defineAlias(), defineAllowedValues(), defineNamespace(), defineValueAliases(), and HTMLPurifier_Config::getAllowedDirectivesForForm().
| HTMLPurifier_ConfigSchema::add | ( | $ | namespace, | |
| $ | name, | |||
| $ | default, | |||
| $ | type, | |||
| $ | allow_null | |||
| ) |
Defines a directive for configuration.
This method's signature is slightly different from the legacy define() static method! Beware!
| $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 |
Definition at line 81 of file ConfigSchema.php.
References HTMLPurifier_VarParser::$types.
| HTMLPurifier_ConfigSchema::addNamespace | ( | $ | namespace | ) |
Defines a namespace for directives to be put into.
| $namespace | Namespace's name |
Definition at line 95 of file ConfigSchema.php.
| HTMLPurifier_ConfigSchema::addValueAliases | ( | $ | namespace, | |
| $ | name, | |||
| $ | 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.
| $namespace | Directive's namespace | |
| $name | Name of Directive | |
| $aliases | Hash of aliased values to the real alias |
Definition at line 109 of file ConfigSchema.php.
| HTMLPurifier_ConfigSchema::addAllowedValues | ( | $ | namespace, | |
| $ | name, | |||
| $ | allowed | |||
| ) |
Defines a set of allowed values for a directive.
| $namespace | Namespace of directive | |
| $name | Name of directive | |
| $allowed | Lookup array of allowed values |
Definition at line 126 of file ConfigSchema.php.
| HTMLPurifier_ConfigSchema::addAlias | ( | $ | namespace, | |
| $ | name, | |||
| $ | new_namespace, | |||
| $ | new_name | |||
| ) |
Defines a directive alias for backwards compatibility.
| $namespace | ||
| $name | Directive that will be aliased | |
| $new_namespace | ||
| $new_name | Directive that the alias will be to |
Definition at line 137 of file ConfigSchema.php.
| HTMLPurifier_ConfigSchema::postProcess | ( | ) |
Replaces any stdclass that only has the type property with type integer.
Definition at line 148 of file ConfigSchema.php.
References $info.
| static HTMLPurifier_ConfigSchema::define | ( | $ | namespace, | |
| $ | name, | |||
| $ | default, | |||
| $ | type, | |||
| $ | description | |||
| ) | [static] |
Definition at line 163 of file ConfigSchema.php.
References deprecated(), and instance().
| static HTMLPurifier_ConfigSchema::defineNamespace | ( | $ | namespace, | |
| $ | description | |||
| ) | [static] |
Definition at line 174 of file ConfigSchema.php.
References deprecated(), and instance().
| static HTMLPurifier_ConfigSchema::defineValueAliases | ( | $ | namespace, | |
| $ | name, | |||
| $ | aliases | |||
| ) | [static] |
Definition at line 181 of file ConfigSchema.php.
References deprecated(), and instance().
| static HTMLPurifier_ConfigSchema::defineAllowedValues | ( | $ | namespace, | |
| $ | name, | |||
| $ | allowed_values | |||
| ) | [static] |
Definition at line 188 of file ConfigSchema.php.
References deprecated(), and instance().
| static HTMLPurifier_ConfigSchema::defineAlias | ( | $ | namespace, | |
| $ | name, | |||
| $ | new_namespace, | |||
| $ | new_name | |||
| ) | [static] |
Definition at line 199 of file ConfigSchema.php.
References deprecated(), and instance().
| HTMLPurifier_ConfigSchema::validate | ( | $ | a, | |
| $ | b, | |||
| $ | c = false | |||
| ) |
| static HTMLPurifier_ConfigSchema::deprecated | ( | $ | method | ) | [static, private] |
Throws an E_USER_NOTICE stating that a method is deprecated.
Definition at line 215 of file ConfigSchema.php.
Referenced by define(), defineAlias(), defineAllowedValues(), defineNamespace(), and defineValueAliases().
| static HTMLPurifier_ConfigSchema::makeFromSerial | ( | ) | [static] |
| static HTMLPurifier_ConfigSchema::instance | ( | $ | prototype = null |
) | [static] |
Retrieves an instance of the application-wide configuration definition.
Definition at line 1772 of file HTMLPurifier.standalone.php.
References $singleton, and makeFromSerial().
| HTMLPurifier_ConfigSchema::add | ( | $ | namespace, | |
| $ | name, | |||
| $ | default, | |||
| $ | type, | |||
| $ | allow_null | |||
| ) |
Defines a directive for configuration.
This method's signature is slightly different from the legacy define() static method! Beware!
| $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 |
Definition at line 1793 of file HTMLPurifier.standalone.php.
References HTMLPurifier_VarParser::$types.
| HTMLPurifier_ConfigSchema::addNamespace | ( | $ | namespace | ) |
Defines a namespace for directives to be put into.
| $namespace | Namespace's name |
Definition at line 1807 of file HTMLPurifier.standalone.php.
| HTMLPurifier_ConfigSchema::addValueAliases | ( | $ | namespace, | |
| $ | name, | |||
| $ | 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.
| $namespace | Directive's namespace | |
| $name | Name of Directive | |
| $aliases | Hash of aliased values to the real alias |
Definition at line 1821 of file HTMLPurifier.standalone.php.
| HTMLPurifier_ConfigSchema::addAllowedValues | ( | $ | namespace, | |
| $ | name, | |||
| $ | allowed | |||
| ) |
Defines a set of allowed values for a directive.
| $namespace | Namespace of directive | |
| $name | Name of directive | |
| $allowed | Lookup array of allowed values |
Definition at line 1838 of file HTMLPurifier.standalone.php.
| HTMLPurifier_ConfigSchema::addAlias | ( | $ | namespace, | |
| $ | name, | |||
| $ | new_namespace, | |||
| $ | new_name | |||
| ) |
Defines a directive alias for backwards compatibility.
| $namespace | ||
| $name | Directive that will be aliased | |
| $new_namespace | ||
| $new_name | Directive that the alias will be to |
Definition at line 1849 of file HTMLPurifier.standalone.php.
| HTMLPurifier_ConfigSchema::postProcess | ( | ) |
Replaces any stdclass that only has the type property with type integer.
Definition at line 1860 of file HTMLPurifier.standalone.php.
References $info.
| static HTMLPurifier_ConfigSchema::define | ( | $ | namespace, | |
| $ | name, | |||
| $ | default, | |||
| $ | type, | |||
| $ | description | |||
| ) | [static] |
Definition at line 1875 of file HTMLPurifier.standalone.php.
References deprecated(), and instance().
| static HTMLPurifier_ConfigSchema::defineNamespace | ( | $ | namespace, | |
| $ | description | |||
| ) | [static] |
Definition at line 1886 of file HTMLPurifier.standalone.php.
References deprecated(), and instance().
| static HTMLPurifier_ConfigSchema::defineValueAliases | ( | $ | namespace, | |
| $ | name, | |||
| $ | aliases | |||
| ) | [static] |
Definition at line 1893 of file HTMLPurifier.standalone.php.
References deprecated(), and instance().
| static HTMLPurifier_ConfigSchema::defineAllowedValues | ( | $ | namespace, | |
| $ | name, | |||
| $ | allowed_values | |||
| ) | [static] |
Definition at line 1900 of file HTMLPurifier.standalone.php.
References deprecated(), and instance().
| static HTMLPurifier_ConfigSchema::defineAlias | ( | $ | namespace, | |
| $ | name, | |||
| $ | new_namespace, | |||
| $ | new_name | |||
| ) | [static] |
Definition at line 1911 of file HTMLPurifier.standalone.php.
References deprecated(), and instance().
| HTMLPurifier_ConfigSchema::validate | ( | $ | a, | |
| $ | b, | |||
| $ | c = false | |||
| ) |
Definition at line 1918 of file HTMLPurifier.standalone.php.
| static HTMLPurifier_ConfigSchema::deprecated | ( | $ | method | ) | [static, private] |
Throws an E_USER_NOTICE stating that a method is deprecated.
Definition at line 1927 of file HTMLPurifier.standalone.php.
| HTMLPurifier_ConfigSchema::$defaults = array() |
Defaults of the directives and namespaces.
Definition at line 12 of file ConfigSchema.php.
| HTMLPurifier_ConfigSchema::$info = array() |
Definition of the directives.
The structure of this is:
array( 'Namespace' => array( 'Directive' => new stdclass(), ) )
The stdclass may have the following properties:
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.
Definition at line 43 of file ConfigSchema.php.
Referenced by postProcess().
HTMLPurifier_ConfigSchema::$singleton [static, protected] |
Application-wide singleton.
Definition at line 48 of file ConfigSchema.php.
Referenced by instance().
1.5.3