TYPO3  7.6
Public Member Functions | Static Private Attributes | List of all members
Swift_CharacterReader_Utf8Reader Class Reference
Inheritance diagram for Swift_CharacterReader_Utf8Reader:
Swift_CharacterReader

Public Member Functions

 getCharPositions ($string, $startOffset, &$currentMap, &$ignoredChars)
 
 getMapType ()
 
 validateByteSequence ($bytes, $size)
 
 getInitialByteSize ()
 

Static Private Attributes

static $length_map
 
static $s_length_map
 

Additional Inherited Members

- Public Attributes inherited from Swift_CharacterReader
const MAP_TYPE_INVALID = 0x01
 
const MAP_TYPE_FIXED_LEN = 0x02
 
const MAP_TYPE_POSITIONS = 0x03
 

Detailed Description

Analyzes UTF-8 characters.

Author
Chris Corbyn
Xavier De Cock xdeco.nosp@m.ck@g.nosp@m.mail..nosp@m.com

Definition at line 17 of file Utf8Reader.php.

Member Function Documentation

getCharPositions (   $string,
  $startOffset,
$currentMap,
$ignoredChars 
)

Returns the complete character map.

Parameters
string$string
int$startOffset
array$currentMap
mixed$ignoredChars
Returns
int

Implements Swift_CharacterReader.

Definition at line 85 of file Utf8Reader.php.

getInitialByteSize ( )

Returns the number of bytes which should be read to start each character.

Returns
int

Implements Swift_CharacterReader.

Definition at line 175 of file Utf8Reader.php.

getMapType ( )

Returns mapType.

Returns
int mapType

Implements Swift_CharacterReader.

Definition at line 139 of file Utf8Reader.php.

validateByteSequence (   $bytes,
  $size 
)

Returns an integer which specifies how many more bytes to read.

A positive integer indicates the number of more bytes to fetch before invoking this method again. A value of zero means this is already a valid character. A value of -1 means this cannot possibly be a valid character.

Parameters
string$bytes
int$size
Returns
int

Implements Swift_CharacterReader.

Definition at line 157 of file Utf8Reader.php.

Member Data Documentation

$length_map
staticprivate
Initial value:
= array(
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0,
)

Pre-computed for optimization

Definition at line 20 of file Utf8Reader.php.

$s_length_map
staticprivate

Definition at line 40 of file Utf8Reader.php.