Menu

## QRDataModeAbstract
in package
implements QRDataModeInterface

QRDataModeAbstract.php : 18

abstract methods for the several data modes

### Interfaces, Classes, Traits and Enums

QRDataModeInterface
  Specifies the methods reqired for the data modules (Number, Alphanum, Byte and Kanji)

### Table of Contents

$data : string
  The data to write
$datamode : int
  the current data mode: Num, Alphanum, Kanji, Hanzi, Byte
__construct() : mixed
  QRDataModeAbstract constructor.
convertEncoding() : string
  encoding conversion helper
getDataMode() : int
  returns the current data mode constant
getCharCount() : int
  returns the character count of the $data string
getLengthBits() : int
  shortcut

### Properties

#### $data

QRDataModeAbstract.php : 28

The data to write

`protected string $data`

#### $datamode

QRDataModeAbstract.php : 23

the current data mode: Num, Alphanum, Kanji, Hanzi, Byte

`protected static int $datamode`

### Methods

#### __construct()

QRDataModeAbstract.php : 35

QRDataModeAbstract constructor.

`public __construct(string $data) : mixed`

##### Parameters

$data : string

##### Tags

throws
  QRCodeDataException

##### Return values

mixed —

#### convertEncoding()

QRDataModeAbstract.php : 62

encoding conversion helper

`public static convertEncoding(string $string) : string`

##### Parameters

$string : string

##### Tags

inheritDoc

##### Return values

string —

#### getDataMode()

QRDataModeAbstract.php : 55

returns the current data mode constant

`public getDataMode() : int`

##### Tags

inheritDoc

##### Return values

int —

#### getCharCount()

QRDataModeAbstract.php : 48

returns the character count of the $data string

`protected getCharCount() : int`

##### Return values

int —

#### getLengthBits()

QRDataModeAbstract.php : 69

shortcut

`protected static getLengthBits(int $versionNumber) : int`

##### Parameters

$versionNumber : int

##### Return values

int —

## Search results