TYPO3  7.6
Public Member Functions | Public Attributes | List of all members
Swift_CharacterReader Interface Reference
Inheritance diagram for Swift_CharacterReader:
Swift_CharacterReader_GenericFixedWidthReader Swift_CharacterReader_UsAsciiReader Swift_CharacterReader_Utf8Reader

Public Member Functions

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

Public Attributes

const MAP_TYPE_INVALID = 0x01
 
const MAP_TYPE_FIXED_LEN = 0x02
 
const MAP_TYPE_POSITIONS = 0x03
 

Detailed Description

Analyzes characters for a specific character set.

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

Definition at line 17 of file CharacterReader.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

Implemented in Swift_CharacterReader_Utf8Reader, Swift_CharacterReader_GenericFixedWidthReader, and Swift_CharacterReader_UsAsciiReader.

getInitialByteSize ( )

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

For fixed width character sets this should be the number of octets-per-character. For multibyte character sets this will probably be 1.

Returns
int

Implemented in Swift_CharacterReader_Utf8Reader, Swift_CharacterReader_GenericFixedWidthReader, and Swift_CharacterReader_UsAsciiReader.

getMapType ( )
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
integer[]$bytes
int$size
Returns
int

Implemented in Swift_CharacterReader_Utf8Reader, Swift_CharacterReader_GenericFixedWidthReader, and Swift_CharacterReader_UsAsciiReader.

Member Data Documentation

const MAP_TYPE_FIXED_LEN = 0x02

Definition at line 20 of file CharacterReader.php.

Referenced by Swift_CharacterStream_NgCharacterStream\read().

const MAP_TYPE_INVALID = 0x01

Definition at line 19 of file CharacterReader.php.

Referenced by Swift_CharacterStream_NgCharacterStream\read().

const MAP_TYPE_POSITIONS = 0x03

Definition at line 21 of file CharacterReader.php.

Referenced by Swift_CharacterStream_NgCharacterStream\read().