# Documentation

Menu

## QRDataModeAbstract
in package
implements QRDataModeInterface

AbstractYes
QRDataModeAbstract.php : 19

abstract methods for the several data modes

### Table of Contents

#### Interfaces

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

#### Properties

$data : string
  The data to write

#### Methods

__construct() : mixed
  QRDataModeAbstract constructor.
convertEncoding() : string
  encoding conversion helper
getCharCount() : int
  returns the character count of the $data string
getLengthBits() : int
  shortcut

### Properties

#### $data

QRDataModeAbstract.php : 24

The data to write

`protected string $data`

### Methods

#### __construct()

QRDataModeAbstract.php : 31

QRDataModeAbstract constructor.

`public __construct(string $data) : mixed`

##### Parameters

$data : string

##### Tags

throws
  QRCodeDataException

#### convertEncoding()

QRDataModeAbstract.php : 48

encoding conversion helper

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

##### Parameters

$string : string

##### Return values

string

#### getCharCount()

QRDataModeAbstract.php : 44

returns the character count of the $data string

`protected getCharCount() : int`

##### Return values

int

#### getLengthBits()

QRDataModeAbstract.php : 55

shortcut

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

##### Parameters

$versionNumber : int

##### Return values

int

## Search results