API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_AttrDef_Enum Class Reference
Inheritance diagram for HTMLPurifier_AttrDef_Enum:
Collaboration diagram for HTMLPurifier_AttrDef_Enum:

Public Member Functions

 __construct ($valid_values=array(), $case_sensitive=false)
 
 validate ($string, $config, $context)
 
 make ($string)
 
- Public Member Functions inherited from HTMLPurifier_AttrDef
 validate ($string, $config, $context)
 
 parseCDATA ($string)
 
 make ($string)
 

Data Fields

 $valid_values = array()
 
- Data Fields inherited from HTMLPurifier_AttrDef
 $minimized = false
 
 $required = false
 

Protected Attributes

 $case_sensitive = false
 

Additional Inherited Members

- Protected Member Functions inherited from HTMLPurifier_AttrDef
 mungeRgb ($string)
 
 expandCSSEscape ($string)
 

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

Constructor & Destructor Documentation

◆ __construct()

__construct (   $valid_values = array(),
  $case_sensitive = false 
)
Parameters
array$valid_valuesList of valid values
bool$case_sensitiveWhether or not case sensitive

Member Function Documentation

◆ make()

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

Reimplemented from HTMLPurifier_AttrDef.

◆ validate()

validate (   $string,
  $config,
  $context 
)
Parameters
string$string
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
bool|string

Reimplemented from HTMLPurifier_AttrDef.

Reimplemented in HTMLPurifier_AttrDef_HTML_FrameTarget.

Field Documentation

◆ $case_sensitive

$case_sensitive = false
protected

Bool indicating whether or not enumeration is case sensitive.

Note
In general this is always case insensitive.

◆ $valid_values

$valid_values = array()

Lookup table of valid values. @type array

Todo:
Make protected

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