XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
HTMLPurifier_ConfigSchema_Validator Class Reference

Public Member Functions

 __construct ()
 
 validate ($interchange)
 
 validateDirective ($d)
 
 validateDirectiveAliases ($d)
 
 validateDirectiveAllowed ($d)
 
 validateDirectiveValueAliases ($d)
 
 validateId ($id)
 

Public Attributes

 $aliases
 

Protected Member Functions

 error ($target, $msg)
 
 getFormattedContext ()
 
 with ($obj, $member)
 

Protected Attributes

 $context = array()
 
 $interchange
 
 $parser
 

Detailed Description

Performs validations on HTMLPurifier_ConfigSchema_Interchange

Note
If you see '// handled by InterchangeBuilder', that means a design decision in that class would prevent this validation from ever being necessary. We have them anyway, however, for redundancy.

Definition at line 11 of file Validator.php.

Constructor & Destructor Documentation

HTMLPurifier_ConfigSchema_Validator::__construct ( )

Definition at line 29 of file Validator.php.

Member Function Documentation

HTMLPurifier_ConfigSchema_Validator::error (   $target,
  $msg 
)
protected

Emits an error, providing helpful context.

Definition at line 191 of file Validator.php.

References $msg, $target, and getFormattedContext().

Referenced by validate(), validateDirective(), validateDirectiveAliases(), validateDirectiveAllowed(), validateDirectiveValueAliases(), and validateId().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_ConfigSchema_Validator::getFormattedContext ( )
protected

Returns a formatted context string.

Definition at line 200 of file Validator.php.

Referenced by error(), and with().

Here is the caller graph for this function:

HTMLPurifier_ConfigSchema_Validator::validate (   $interchange)

Validates a fully-formed interchange object. Throws an HTMLPurifier_ConfigSchema_Exception if there's a problem.

Definition at line 37 of file Validator.php.

References $i, $interchange, error(), and validateDirective().

Here is the call graph for this function:

HTMLPurifier_ConfigSchema_Validator::validateDirective (   $d)

Validates a HTMLPurifier_ConfigSchema_Interchange_Directive object.

Definition at line 71 of file Validator.php.

References HTMLPurifier_VarParser\$stringTypes, HTMLPurifier_VarParser\$types, error(), validateDirectiveAliases(), validateDirectiveAllowed(), validateDirectiveValueAliases(), validateId(), and with().

Referenced by validate().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_ConfigSchema_Validator::validateDirectiveAliases (   $d)

Extra validation if $aliases member variable of HTMLPurifier_ConfigSchema_Interchange_Directive is defined.

Definition at line 159 of file Validator.php.

References error(), validateId(), and with().

Referenced by validateDirective().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_ConfigSchema_Validator::validateDirectiveAllowed (   $d)

Extra validation if $allowed member variable of HTMLPurifier_ConfigSchema_Interchange_Directive is defined.

Definition at line 112 of file Validator.php.

References error(), and with().

Referenced by validateDirective().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_ConfigSchema_Validator::validateDirectiveValueAliases (   $d)

Extra validation if $valueAliases member variable of HTMLPurifier_ConfigSchema_Interchange_Directive is defined.

Definition at line 131 of file Validator.php.

References error(), and with().

Referenced by validateDirective().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_ConfigSchema_Validator::validateId (   $id)

Validates a HTMLPurifier_ConfigSchema_Interchange_Id object.

Definition at line 53 of file Validator.php.

References error(), and with().

Referenced by validateDirective(), and validateDirectiveAliases().

Here is the call graph for this function:

Here is the caller graph for this function:

HTMLPurifier_ConfigSchema_Validator::with (   $obj,
  $member 
)
protected

Convenience function for generating HTMLPurifier_ConfigSchema_ValidatorAtom for validating simple member variables of objects.

Definition at line 184 of file Validator.php.

References getFormattedContext().

Referenced by validateDirective(), validateDirectiveAliases(), validateDirectiveAllowed(), validateDirectiveValueAliases(), and validateId().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

HTMLPurifier_ConfigSchema_Validator::$aliases

Definition at line 17 of file Validator.php.

HTMLPurifier_ConfigSchema_Validator::$context = array()
protected

Context-stack to provide easy to read error messages.

Definition at line 22 of file Validator.php.

HTMLPurifier_ConfigSchema_Validator::$interchange
protected

Easy to access global objects.

Definition at line 17 of file Validator.php.

Referenced by validate().

HTMLPurifier_ConfigSchema_Validator::$parser
protected

HTMLPurifier_VarParser to test default's type.

Definition at line 27 of file Validator.php.


The documentation for this class was generated from the following file: