Aspose.Barcode for PHP via Java Generation and Recognition API docs

Inherits HIBCLICComplexCodetext.

Public Member Functions

 __construct ()
 
 getData ()
 
 setData (PrimaryData $value)
 
 getConstructedCodetext ()
 
 initFromString (string $constructedCodetext)
 
 equals (HIBCLICPrimaryDataCodetext $obj)
 
 hashCode ()
 
- Public Member Functions inherited from HIBCLICComplexCodetext
 __construct ($javaClass)
 
 getBarcodeType ()
 
 setBarcodeType (int $value)
 
- Public Member Functions inherited from BaseJavaClass
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Static Public Member Functions

static construct ($java_class)
 

Public Attributes

const JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCLICPrimaryDataCodetext"
 

Protected Member Functions

 init ()
 
- Protected Member Functions inherited from BaseJavaClass
 setJavaClass ($javaClass)
 

Private Attributes

 $data
 

Detailed Description

Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary data.


This sample shows how to encode and decode HIBC LIC using HIBCLICPrimaryCodetext.
$complexCodetext  = new HIBCLICPrimaryCodetext();
$complexCodetext->setBarcodeType(EncodeTypes::HIBCQRLIC);
$complexCodetext->setData(new PrimaryData());
$complexCodetext->getData()->setProductOrCatalogNumber("12345");
$complexCodetext->getData()->setLabelerIdentificationCode("A999");
$complexCodetext->getData()->setUnitOfMeasureID(1);
$generator = new ComplexBarcodeGenerator($complexCodetext);
{
    $image = $generator->generateBarCodeImage(BarCodeImageFormat::PNG);
    $reader = new BarCodeReader($image, null, DecodeType::HIBCQRLIC);
    {
        $reader->readBarCodes();
        $codetext = $reader->getFoundBarCodes()[0]->getCodeText();
        $result = ComplexCodetextReader::tryDecodeHIBCLIC($codetext) ;
        print("Product or catalog number: " . $result->getData()->getProductOrCatalogNumber());
        print("Labeler identification code: " . $result->getData()->getLabelerIdentificationCode());
        print("Unit of measure ID: " . $result->getData()->getUnitOfMeasureID());
    }
}

Constructor & Destructor Documentation

◆ __construct()

HIBCLICPrimaryDataCodetext::__construct ( )

Member Function Documentation

◆ construct()

static HIBCLICPrimaryDataCodetext::construct (   $java_class)
static

◆ equals()

HIBCLICPrimaryDataCodetext::equals ( HIBCLICPrimaryDataCodetext  $obj)

Returns a value indicating whether this instance is equal to a specified

value.

Parameters
objAn value to compare to this instance.
Returns
<b>true</b>
if obj has the same value as this instance; otherwise,
<b>false</b>
.

◆ getConstructedCodetext()

HIBCLICPrimaryDataCodetext::getConstructedCodetext ( )

Constructs codetext

Returns
Constructed codetext

Reimplemented from HIBCLICComplexCodetext.

◆ getData()

HIBCLICPrimaryDataCodetext::getData ( )

Identifies primary data.

◆ hashCode()

HIBCLICPrimaryDataCodetext::hashCode ( )

Returns the hash code for this instance.

Returns
A 32-bit signed integer hash code.

◆ init()

HIBCLICPrimaryDataCodetext::init ( )
protected

Reimplemented from BaseJavaClass.

◆ initFromString()

HIBCLICPrimaryDataCodetext::initFromString ( string  $constructedCodetext)

Initializes instance from constructed codetext.

Parameters
constructedCodetextConstructed codetext.

Reimplemented from HIBCLICComplexCodetext.

◆ setData()

HIBCLICPrimaryDataCodetext::setData ( PrimaryData  $value)

Identifies primary data.

Member Data Documentation

◆ $data

HIBCLICPrimaryDataCodetext::$data
private

◆ JAVA_CLASS_NAME

const HIBCLICPrimaryDataCodetext::JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCLICPrimaryDataCodetext"