@@ -87,7 +87,7 @@ public function setCharset($sCharset): void
87
87
*
88
88
* @return string
89
89
*/
90
- public function getCharset ()
90
+ private function getCharset ()
91
91
{
92
92
return $ this ->sCharset ;
93
93
}
@@ -205,7 +205,7 @@ public function parseCharacter($bIsForIdentifier)
205
205
$ sUtf32 .= \chr ($ iUnicode & 0xff );
206
206
$ iUnicode = $ iUnicode >> 8 ;
207
207
}
208
- return \iconv ('utf-32le ' , $ this ->sCharset , $ sUtf32 );
208
+ return \iconv ('utf-32le ' , $ this ->getCharset () , $ sUtf32 );
209
209
}
210
210
if ($ bIsForIdentifier ) {
211
211
$ peek = \ord ($ this ->peek ());
@@ -441,7 +441,7 @@ public function backtrack($iAmount): void
441
441
public function strlen ($ sString ): int
442
442
{
443
443
if ($ this ->oParserSettings ->bMultibyteSupport ) {
444
- return \mb_strlen ($ sString , $ this ->sCharset );
444
+ return \mb_strlen ($ sString , $ this ->getCharset () );
445
445
} else {
446
446
return \strlen ($ sString );
447
447
}
@@ -474,7 +474,7 @@ private function substr($iStart, $iLength): string
474
474
private function strtolower ($ sString ): string
475
475
{
476
476
if ($ this ->oParserSettings ->bMultibyteSupport ) {
477
- return \mb_strtolower ($ sString , $ this ->sCharset );
477
+ return \mb_strtolower ($ sString , $ this ->getCharset () );
478
478
} else {
479
479
return \strtolower ($ sString );
480
480
}
@@ -488,13 +488,13 @@ private function strtolower($sString): string
488
488
private function strsplit ($ sString )
489
489
{
490
490
if ($ this ->oParserSettings ->bMultibyteSupport ) {
491
- if ($ this ->streql ($ this ->sCharset , 'utf-8 ' )) {
491
+ if ($ this ->streql ($ this ->getCharset () , 'utf-8 ' )) {
492
492
return \preg_split ('//u ' , $ sString , -1 , PREG_SPLIT_NO_EMPTY );
493
493
} else {
494
- $ iLength = \mb_strlen ($ sString , $ this ->sCharset );
494
+ $ iLength = \mb_strlen ($ sString , $ this ->getCharset () );
495
495
$ result = [];
496
496
for ($ i = 0 ; $ i < $ iLength ; ++$ i ) {
497
- $ result [] = \mb_substr ($ sString , $ i , 1 , $ this ->sCharset );
497
+ $ result [] = \mb_substr ($ sString , $ i , 1 , $ this ->getCharset () );
498
498
}
499
499
return $ result ;
500
500
}
@@ -517,7 +517,7 @@ private function strsplit($sString)
517
517
private function strpos ($ sString , $ sNeedle , $ iOffset )
518
518
{
519
519
if ($ this ->oParserSettings ->bMultibyteSupport ) {
520
- return \mb_strpos ($ sString , $ sNeedle , $ iOffset , $ this ->sCharset );
520
+ return \mb_strpos ($ sString , $ sNeedle , $ iOffset , $ this ->getCharset () );
521
521
} else {
522
522
return \strpos ($ sString , $ sNeedle , $ iOffset );
523
523
}
0 commit comments