PHP Class Znerol\Component\Stringprep\Profile

Exibir arquivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$casefold One of CASEFOLD_NONE, CASEFOLD_B2, CASEFOLD_B3.
$checkbidi If set, the mechanism for checking bidirectional strings described in RFC3454 is applied.
$normalize Whether to apply string normalization (NFKC)
$prohibit An array of tables from RFC3454 appendix C.
$removeZWS If set to true the characters from RFC3454 table B.1 are removed from the output.

Public Methods

Method Description
apply ( $string, $encoding = 'UTF-8', $mode = self::MODE_STORE ) Apply this profile to a given string.

Protected Methods

Method Description
applyMappingTable ( $codepoints, $func ) Helper method: Apply a mapping table function to the given array of codepoints.
checkbidi ( $codepoints ) Check for bidirectional text (RFC 3454 section 6)
map ( $codepoints ) Apply mapping (RFC 3454 section 3)
normalize ( $codepoints ) Normalize string (RFC 3454 section 4)
prohibit ( $codepoints ) Check for prohibited output (RFC 3454 section 5)
validateCodepoint ( $codepoint, $index, $func ) Helper method: Check if the given codepoint is prohibited by a table.

Method Details

apply() public method

Apply this profile to a given string.
public apply ( $string, $encoding = 'UTF-8', $mode = self::MODE_STORE )

applyMappingTable() protected static method

Helper method: Apply a mapping table function to the given array of codepoints.
protected static applyMappingTable ( $codepoints, $func )

checkbidi() protected method

* If a string contains any RandALCat character (Table D.1), the string MUST NOT contain any LCat (Table D.2) character. * If a string contains any RandALCat character, a RandALCat character MUST be the first character of the string, and a RandALCat character MUST be the last character of the string.
protected checkbidi ( $codepoints )

map() protected method

Apply mapping (RFC 3454 section 3)
protected map ( $codepoints )

normalize() protected method

Normalize string (RFC 3454 section 4)
protected normalize ( $codepoints )

prohibit() protected method

Check for prohibited output (RFC 3454 section 5)
protected prohibit ( $codepoints )

validateCodepoint() protected static method

Helper method: Check if the given codepoint is prohibited by a table.
protected static validateCodepoint ( $codepoint, $index, $func )

Property Details

$casefold protected_oe property

One of CASEFOLD_NONE, CASEFOLD_B2, CASEFOLD_B3.
protected $casefold

$checkbidi protected_oe property

If set, the mechanism for checking bidirectional strings described in RFC3454 is applied.
protected $checkbidi

$normalize protected_oe property

Whether to apply string normalization (NFKC)
protected $normalize

$prohibit protected_oe property

An array of tables from RFC3454 appendix C.
protected $prohibit

$removeZWS protected_oe property

If set to true the characters from RFC3454 table B.1 are removed from the output.
protected $removeZWS