PHP Class HTMLPurifier_AttrDef_Enum, yii

Inheritance: extends HTMLPurifier_AttrDef
显示文件 Open project: yiisoft/yii Class Usage Examples

Public Properties

Property Type Description
$valid_values Lookup table of valid values.

Protected Properties

Property Type Description
$case_sensitive Bool indicating whether or not enumeration is case sensitive.

Public Methods

Method Description
__construct ( array $valid_values = [], boolean $case_sensitive = false )
make ( string $string ) : HTMLPurifier_AttrDef_Enum
validate ( string $string, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : boolean | string

Method Details

__construct() public method

public __construct ( array $valid_values = [], boolean $case_sensitive = false )
$valid_values array List of valid values
$case_sensitive boolean Whether or not case sensitive

make() public method

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

validate() public method

public validate ( string $string, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : boolean | string
$string string
$config HTMLPurifier_Config
$context HTMLPurifier_Context
return boolean | string

Property Details

$case_sensitive protected_oe property

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

$valid_values public_oe property

Lookup table of valid values.
public $valid_values