HTMLPurifier 4.4.0
HTMLPurifier_AttrDef_Enum Class Reference

Validates a keyword against a list of valid values. More...

Inheritance diagram for HTMLPurifier_AttrDef_Enum:
HTMLPurifier_AttrDef HTMLPurifier_AttrDef HTMLPurifier_AttrDef_HTML_FrameTarget HTMLPurifier_AttrDef_HTML_FrameTarget

List of all members.

Public Member Functions

 __construct ($valid_values=array(), $case_sensitive=false)
 validate ($string, $config, $context)
 Validates and cleans passed string according to a definition.
 make ($string)
 __construct ($valid_values=array(), $case_sensitive=false)
 validate ($string, $config, $context)
 Validates and cleans passed string according to a definition.
 make ($string)

Public Attributes

 $valid_values = array()
 Lookup table of valid values.

Protected Attributes

 $case_sensitive = false
 Bool indicating whether or not enumeration is case sensitive.

Detailed Description

Validates a keyword against a list of valid values.

Warning:
The case-insensitive compare of this function uses PHP's built-in strtolower and ctype_lower functions, which may cause problems with international comparisons

Definition at line 10 of file Enum.php.


Constructor & Destructor Documentation

HTMLPurifier_AttrDef_Enum::__construct ( valid_values = array(),
case_sensitive = false 
)
Parameters:
$valid_valuesList of valid values
$case_sensitiveBool indicating whether or not case sensitive

Definition at line 29 of file Enum.php.

References $case_sensitive, and $valid_values.

HTMLPurifier_AttrDef_Enum::__construct ( valid_values = array(),
case_sensitive = false 
)
Parameters:
$valid_valuesList of valid values
$case_sensitiveBool indicating whether or not case sensitive

Definition at line 8325 of file HTMLPurifier.standalone.php.

References $case_sensitive, and $valid_values.


Member Function Documentation

HTMLPurifier_AttrDef_Enum::make ( string)
Parameters:
$stringIn form of comma-delimited list of case-insensitive valid values. Example: "foo,bar,baz". Prepend "s:" to make case sensitive

Reimplemented from HTMLPurifier_AttrDef.

Definition at line 52 of file Enum.php.

HTMLPurifier_AttrDef_Enum::make ( string)
Parameters:
$stringIn form of comma-delimited list of case-insensitive valid values. Example: "foo,bar,baz". Prepend "s:" to make case sensitive

Reimplemented from HTMLPurifier_AttrDef.

Definition at line 8348 of file HTMLPurifier.standalone.php.

HTMLPurifier_AttrDef_Enum::validate ( string,
config,
context 
)

Validates and cleans passed string according to a definition.

Parameters:
$stringString to be validated and cleaned.
$configMandatory HTMLPurifier_Config object.
$contextMandatory HTMLPurifier_AttrContext object.

Reimplemented from HTMLPurifier_AttrDef.

Reimplemented in HTMLPurifier_AttrDef_HTML_FrameTarget, and HTMLPurifier_AttrDef_HTML_FrameTarget.

Definition at line 8332 of file HTMLPurifier.standalone.php.

HTMLPurifier_AttrDef_Enum::validate ( string,
config,
context 
)

Validates and cleans passed string according to a definition.

Parameters:
$stringString to be validated and cleaned.
$configMandatory HTMLPurifier_Config object.
$contextMandatory HTMLPurifier_AttrContext object.

Reimplemented from HTMLPurifier_AttrDef.

Reimplemented in HTMLPurifier_AttrDef_HTML_FrameTarget, and HTMLPurifier_AttrDef_HTML_FrameTarget.

Definition at line 36 of file Enum.php.


Member Data Documentation

HTMLPurifier_AttrDef_Enum::$case_sensitive = false [protected]

Bool indicating whether or not enumeration is case sensitive.

Note:
In general this is always case insensitive.

Reimplemented in HTMLPurifier_AttrDef_HTML_FrameTarget.

Definition at line 23 of file Enum.php.

Referenced by __construct().

HTMLPurifier_AttrDef_Enum::$valid_values = array()

Lookup table of valid values.

Todo:
Make protected
Todo:
Make protected

Reimplemented in HTMLPurifier_AttrDef_HTML_FrameTarget.

Definition at line 17 of file Enum.php.

Referenced by __construct().


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