# Documentation

Menu

## ECI extends QRDataModeAbstract
in package

FinalYes
ECI.php : 23

Adds an ECI Designator

ISO/IEC 18004:2000 8.4.1.1

Please note that you have to take care for the correct data encoding when adding with QRCode::add*Segment()

### Table of Contents

#### Constants

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

#### Properties

$data : string
  The data to write
$encoding : int
  The current ECI encoding id

#### Methods

__construct() : mixed
  QRDataModeAbstract constructor.
convertEncoding() : string
  encoding conversion helper
decodeSegment() : string
  Reads and decodes the ECI designator including the following byte sequence
getLengthInBits() : int
parseValue() : ECICharset
  Reads and parses the value of an ECI designator
validateString() : bool
write() : QRDataModeInterface
  Writes an ECI designator to the bitbuffer
getCharCount() : int
  returns the character count of the $data string
getLengthBits() : int
  shortcut

### Constants

#### DATAMODE

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

##### Tags

inheritDoc

### Properties

#### $data

QRDataModeAbstract.php : 23

The data to write

`protected string $data`

#### $encoding

ECI.php : 33

The current ECI encoding id

`private int $encoding`

### Methods

#### __construct()

ECI.php : 39

QRDataModeAbstract constructor.

`public __construct(int $encoding) : mixed`

##### Parameters

$encoding : int

##### Tags

inheritDoc
noinspection

  PhpMissingParentConstructorInspection

#### convertEncoding()

QRDataModeAbstract.php : 50

encoding conversion helper

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

##### Parameters

$string : string

##### Tags

inheritDoc

##### Return values

string

#### decodeSegment()

ECI.php : 128

Reads and decodes the ECI designator including the following byte sequence

`public static decodeSegment(BitBuffer $bitBuffer, int $versionNumber) : string`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

throws
  QRCodeDataException

##### Return values

string

#### getLengthInBits()

ECI.php : 51
`public getLengthInBits() : int`

##### Tags

inheritDoc

##### Return values

int

#### parseValue()

ECI.php : 94

Reads and parses the value of an ECI designator

`public static parseValue(BitBuffer $bitBuffer) : ECICharset`

##### Parameters

$bitBuffer : BitBuffer

##### Tags

throws
  QRCodeDataException

##### Return values

ECICharset

#### validateString()

ECI.php : 119
`public static validateString(string $string) : bool`

##### Parameters

$string : string

##### Tags

codeCoverageIgnore

  Unused, but required as per interface

##### Return values

bool

#### write()

ECI.php : 70

Writes an ECI designator to the bitbuffer

`public write(BitBuffer $bitBuffer, int $versionNumber) : QRDataModeInterface`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc
throws
  QRCodeDataException

##### 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