XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_CharacterReader_GenericFixedWidthReader Class Reference
Inheritance diagram for Swift_CharacterReader_GenericFixedWidthReader:
Inheritance graph

Public Member Functions

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

Private Attributes

 $_width
 

Additional Inherited Members

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

Detailed Description

Definition at line 20 of file GenericFixedWidthReader.php.

Constructor & Destructor Documentation

Swift_CharacterReader_GenericFixedWidthReader::__construct (   $width)

Creates a new GenericFixedWidthReader using $width bytes per character.

Parameters
int$width

Definition at line 35 of file GenericFixedWidthReader.php.

Member Function Documentation

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

Returns the complete charactermap

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

Implements Swift_CharacterReader.

Definition at line 49 of file GenericFixedWidthReader.php.

References $_width.

Swift_CharacterReader_GenericFixedWidthReader::getInitialByteSize ( )

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

Returns
int

Implements Swift_CharacterReader.

Definition at line 91 of file GenericFixedWidthReader.php.

References $_width.

Swift_CharacterReader_GenericFixedWidthReader::getMapType ( )

Returns mapType mapType

Implements Swift_CharacterReader.

Definition at line 64 of file GenericFixedWidthReader.php.

Swift_CharacterReader_GenericFixedWidthReader::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
Returns
int

Implements Swift_CharacterReader.

Definition at line 78 of file GenericFixedWidthReader.php.

Member Data Documentation

Swift_CharacterReader_GenericFixedWidthReader::$_width
private

Definition at line 29 of file GenericFixedWidthReader.php.

Referenced by getCharPositions(), and getInitialByteSize().


The documentation for this class was generated from the following file: