‪Aspose.Barcode for PHP via Java  24.3
‪Aspose.Barcode for PHP via Java Generation and Recognition API docs
HIBCLICCombinedCodetext Class Reference

Inherits HIBCLICComplexCodetext.

Public Member Functions

 __construct ()
 
 getPrimaryData ()
 
 setPrimaryData (PrimaryData $value)
 
 getSecondaryAndAdditionalData ()
 
 setSecondaryAndAdditionalData (SecondaryAndAdditionalData $value)
 
 getConstructedCodetext ()
 
 initFromString (string $constructedCodetext)
 
 equals (HIBCLICCombinedCodetext $obj)
 
 hashCode ()
 
 getBarcodeType ()
 
 setBarcodeType (int $value)
 
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Static Public Member Functions

static construct ($javaClass)
 

Public Attributes

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

Protected Member Functions

 init ()
 
 setJavaClass ($javaClass)
 

Detailed Description

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


This sample shows how to encode and decode HIBC LIC using HIBCLICCombinedCodetext.

$combinedCodetext = new HIBCLICCombinedCodetext();
$combinedCodetext->setBarcodeType(EncodeTypes::HIBCQRLIC);
$combinedCodetext->setPrimaryData(new PrimaryData());
$combinedCodetext->getPrimaryData()->setProductOrCatalogNumber("12345");
$combinedCodetext->getPrimaryData()->setLabelerIdentificationCode("A999");
$combinedCodetext->getPrimaryData()->setUnitOfMeasureID(1);
$combinedCodetext->setSecondaryAndAdditionalData(new SecondaryAndAdditionalData());
$combinedCodetext->getSecondaryAndAdditionalData()->setExpiryDate(new Date());
$combinedCodetext->getSecondaryAndAdditionalData()->setExpiryDateFormat(HIBCLICDateFormat.MMDDYY);
$combinedCodetext->getSecondaryAndAdditionalData()->setQuantity(30);
$combinedCodetext->getSecondaryAndAdditionalData()->setLotNumber("LOT123");
$combinedCodetext->getSecondaryAndAdditionalData()->setSerialNumber("SERIAL123");
$combinedCodetext->getSecondaryAndAdditionalData()->setDateOfManufacture(new Date());
ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(combinedCodetext);
{
    $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->getPrimaryData()->getProductOrCatalogNumber());
        print("Labeler identification code: " . $result->getPrimaryData()->getLabelerIdentificationCode());
        print("Unit of measure ID: " . $result->getPrimaryData()->getUnitOfMeasureID());
        print("Expiry date: " . $result->getSecondaryAndAdditionalData()->getExpiryDate());
        print("Quantity: " . $result->getSecondaryAndAdditionalData()->getQuantity());
        print("Lot number: " . $result->getSecondaryAndAdditionalData()->getLotNumber());
        print("Serial number: " . $result->getSecondaryAndAdditionalData()->getSerialNumber());
        print("Date of manufacture: " . $result->getSecondaryAndAdditionalData()->getDateOfManufacture());
    }
}

Constructor & Destructor Documentation

◆ __construct()

HIBCLICCombinedCodetext::__construct ( )

Member Function Documentation

◆ construct()

static HIBCLICCombinedCodetext::construct (   $javaClass)
static

◆ equals()

HIBCLICCombinedCodetext::equals ( HIBCLICCombinedCodetext  $obj)

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

value.

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

◆ getBarcodeType()

HIBCLICComplexCodetext::getBarcodeType ( )
inherited

Gets or sets barcode type. HIBC LIC codetext can be encoded using HIBCCode39LIC, HIBCCode128LIC, HIBCAztecLIC, HIBCDataMatrixLIC and HIBCQRLIC encode types. Default value: HIBCCode39LIC.

Returns
‪Barcode type.

Reimplemented from IComplexCodetext.

◆ getConstructedCodetext()

HIBCLICCombinedCodetext::getConstructedCodetext ( )

Constructs codetext

Returns
‪Constructed codetext

Reimplemented from HIBCLICComplexCodetext.

◆ getJavaClass()

BaseJavaClass::getJavaClass ( )
inherited

◆ getJavaClassName()

BaseJavaClass::getJavaClassName ( )
inherited

◆ getPrimaryData()

HIBCLICCombinedCodetext::getPrimaryData ( )

Identifies primary data.

◆ getSecondaryAndAdditionalData()

HIBCLICCombinedCodetext::getSecondaryAndAdditionalData ( )

Identifies secondary and additional supplemental data.

◆ hashCode()

HIBCLICCombinedCodetext::hashCode ( )

Returns the hash code for this instance.

Returns
‪A 32-bit signed integer hash code.

◆ init()

HIBCLICCombinedCodetext::init ( )
protected

Reimplemented from BaseJavaClass.

◆ initFromString()

HIBCLICCombinedCodetext::initFromString ( string  $constructedCodetext)

Initializes instance from constructed codetext.

Parameters
constructedCodetext‪Constructed codetext.

Reimplemented from HIBCLICComplexCodetext.

◆ isNull()

BaseJavaClass::isNull ( )
inherited

◆ printJavaClassName()

BaseJavaClass::printJavaClassName ( )
inherited

◆ setBarcodeType()

HIBCLICComplexCodetext::setBarcodeType ( int  $value)
inherited

Gets or sets barcode type. HIBC LIC codetext can be encoded using HIBCCode39LIC, HIBCCode128LIC, HIBCAztecLIC, HIBCDataMatrixLIC and HIBCQRLIC encode types. Default value: HIBCCode39LIC.

Returns
‪Barcode type.

◆ setJavaClass()

BaseJavaClass::setJavaClass (   $javaClass)
protectedinherited

◆ setPrimaryData()

HIBCLICCombinedCodetext::setPrimaryData ( PrimaryData  $value)

Identifies primary data.

◆ setSecondaryAndAdditionalData()

HIBCLICCombinedCodetext::setSecondaryAndAdditionalData ( SecondaryAndAdditionalData  $value)

Identifies secondary and additional supplemental data.

Member Data Documentation

◆ JAVA_CLASS_NAME

const HIBCLICCombinedCodetext::JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCLICCombinedCodetext"