PHP Класс Znerol\Component\Stringprep\Profile

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
apply ( $string, $encoding = 'UTF-8', $mode = self::MODE_STORE ) Apply this profile to a given string.

Защищенные методы

Метод Описание
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.

Описание методов

apply() публичный Метод

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

applyMappingTable() защищенный статический Метод

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

checkbidi() защищенный Метод

* 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() защищенный Метод

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

normalize() защищенный Метод

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

prohibit() защищенный Метод

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

validateCodepoint() защищенный статический Метод

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

Описание свойств

$casefold защищенное свойство

One of CASEFOLD_NONE, CASEFOLD_B2, CASEFOLD_B3.
protected $casefold

$checkbidi защищенное свойство

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

$normalize защищенное свойство

Whether to apply string normalization (NFKC)
protected $normalize

$prohibit защищенное свойство

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

$removeZWS защищенное свойство

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