Documentation

ECI extends QRDataModeAbstract
in package

FinalYes

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
retruns the length in bits of the data string
parseValue()  : ECICharset
Reads and parses the value of an ECI designator
validateString()  : bool
checks if the given string qualifies for the encoder module
write()  : static
Writes an ECI designator to the bitbuffer
getCharCount()  : int
returns the character count of the $data string
getLengthBits()  : int
shortcut

Constants

DATAMODE

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

Properties

$encoding

The current ECI encoding id

private int $encoding

Methods

__construct()

QRDataModeAbstract constructor.

public __construct(int $encoding) : mixed
Parameters
$encoding : int
Tags
inheritDoc
throws
QRCodeDataException
noinspection

PhpMissingParentConstructorInspection

convertEncoding()

encoding conversion helper

public static convertEncoding(string $string) : string
Parameters
$string : string
Return values
string

decodeSegment()

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()

retruns the length in bits of the data string

public getLengthInBits() : int
Return values
int

validateString()

checks if the given string qualifies for the encoder module

public static validateString(string $string) : bool
Parameters
$string : string
Tags
codeCoverageIgnore

Unused, but required as per interface

Return values
bool

write()

Writes an ECI designator to the bitbuffer

public write(BitBuffer $bitBuffer, int $versionNumber) : static
Parameters
$bitBuffer : BitBuffer
$versionNumber : int
Tags
inheritDoc
throws
QRCodeDataException
Return values
static

getCharCount()

returns the character count of the $data string

protected getCharCount() : int
Return values
int

getLengthBits()

shortcut

protected static getLengthBits(int $versionNumber) : int
Parameters
$versionNumber : int
Return values
int

        
On this page

Search results