# Documentation

Menu

## Byte extends QRDataModeAbstract
in package

FinalYes
Byte.php : 23

8-bit Byte mode, ISO-8859-1 or UTF-8

ISO/IEC 18004:2000 Section 8.3.4 ISO/IEC 18004:2000 Section 8.4.4

### Table of Contents

#### Constants

DATAMODE = \chillerlan\QRCode\Common\Mode::BYTE

#### Properties

$data : string
  The data to write

#### Methods

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

### Constants

#### DATAMODE

Byte.php : 28
`public mixed DATAMODE = \chillerlan\QRCode\Common\Mode::BYTE`

##### Tags

inheritDoc

### Properties

#### $data

QRDataModeAbstract.php : 23

The data to write

`protected string $data`

### Methods

#### __construct()

QRDataModeAbstract.php : 30

QRDataModeAbstract constructor.

`public __construct(string $data) : mixed`

##### Parameters

$data : string

##### Tags

throws
  QRCodeDataException

#### convertEncoding()

QRDataModeAbstract.php : 50

encoding conversion helper

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

##### Parameters

$string : string

##### Tags

inheritDoc

##### Return values

string

#### decodeSegment()

Byte.php : 70
`public static decodeSegment(BitBuffer $bitBuffer, int $versionNumber) : string`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc
throws
  QRCodeDataException

##### Return values

string

#### getLengthInBits()

Byte.php : 33
`public getLengthInBits() : int`

##### Tags

inheritDoc

##### Return values

int

#### validateString()

Byte.php : 40
`public static validateString(string $string) : bool`

##### Parameters

$string : string

##### Tags

inheritDoc

##### Return values

bool

#### write()

Byte.php : 47
`public write(BitBuffer $bitBuffer, int $versionNumber) : QRDataModeInterface`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc

##### Return values

QRDataModeInterface

#### getCharCount()

QRDataModeAbstract.php : 43

returns the character count of the $data string

`protected getCharCount() : int`

##### Return values

int

#### getLengthBits()

QRDataModeAbstract.php : 57

shortcut

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

##### Parameters

$versionNumber : int

##### Return values

int

## Search results