Menu

## Byte extends QRDataModeAbstract
in package

Byte.php : 23

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

$data : string
  The data to write
$datamode : int
  the current data mode: Num, Alphanum, Kanji, Byte
__construct() : mixed
  QRDataModeAbstract constructor.
decodeSegment() : string
getDataMode() : int
  returns the current data mode constant
getLengthInBits() : int
validateString() : bool
write() : void
getCharCount() : int
  returns the character count of the $data string
getLengthBits() : int
  shortcut

### Properties

#### $data

QRDataModeAbstract.php : 27

The data to write

`protected string $data`

#### $datamode

Byte.php : 28

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

`protected static int $datamode = \chillerlan\QRCode\Common\Mode::BYTE`

##### Tags

inheritDoc

### Methods

#### __construct()

QRDataModeAbstract.php : 34

QRDataModeAbstract constructor.

`public __construct(string $data) : mixed`

##### Parameters

$data : string

##### Tags

throws
  QRCodeDataException

##### Return values

mixed —

#### decodeSegment()

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

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc
throws
  QRCodeDataException

##### Return values

string —

#### getDataMode()

QRDataModeAbstract.php : 53

returns the current data mode constant

`public getDataMode() : int`

##### Tags

inheritDoc

##### Return values

int —

#### 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) : void`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc

##### Return values

void —

#### getCharCount()

QRDataModeAbstract.php : 46

returns the character count of the $data string

`protected getCharCount() : int`

##### Return values

int —

#### getLengthBits()

QRDataModeAbstract.php : 60

shortcut

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

##### Parameters

$versionNumber : int

##### Return values

int —

## Search results