60 for ($i = 0; $i < 256; $i++) {
61 if ($i >= ord(
'0') && $i <= ord(
'9') || $i >= ord(
'A') && $i <= ord(
'Z') || $i >= ord(
'a') && $i <= ord(
'z')) {
62 $this->hexMatrix[$i] = NULL;
64 $this->hexMatrix[$i] = dechex($i);
76 $stringLength = $this->charsetConversion->strlen(
'utf-8', $input);
78 for ($i = 0; $i < $stringLength; $i++) {
79 $c = $this->charsetConversion->substr(
'utf-8', $input, $i, 1);
82 return $encodedString;
99 $ordinalValue = $this->charsetConversion->utf8CharToUnumber($character);
106 if ($ordinalValue < 256) {
107 $pad = substr(
'00', strlen($hex));
108 return '\\x' . $pad . strtoupper($hex);
111 $pad = substr(
'0000', strlen($hex));
112 return '\\u' . $pad . strtoupper($hex);
122 return in_array($character, $this->immuneCharacters, TRUE);
136 if ($ordinalValue <= 255) {
137 return $this->hexMatrix[$ordinalValue];
139 return dechex($ordinalValue);
static makeInstance($className)
getHexForNonAlphanumeric($ordinalValue)
encodeCharacter($character)
isImmuneCharacter($character)