‪Aspose.Barcode for PHP via Java  23.2
‪Aspose.Barcode for PHP via Java Generation and Recognition API docs
HIBCPASCodetext Class Reference

Inherits IComplexCodetext.

Public Member Functions

 __construct ()
 
 setBarcodeType (int $value)
 
 getDataLocation ()
 
 setDataLocation (int $value)
 
 getRecords ()
 
 addRecord (int $dataType, string $data)
 
 addHIBCPASRecord (HIBCPASRecord $record)
 
 clear ()
 
 getBarcodeType ()
 
 getConstructedCodetext ()
 
 initFromString (string $constructedCodetext)
 
 equals (HIBCPASCodetext $obj)
 
 hashCode ()
 
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Static Public Member Functions

static construct ($javaClass)
 

Public Attributes

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

Protected Member Functions

 init ()
 
 setJavaClass ($javaClass)
 

Detailed Description

Class for encoding and decoding the text embedded in the HIBC PAS code.


 This sample shows how to encode and decode HIBC PAS using HIBCPASCodetext.
 

 $complexCodetext = new HIBCPASComplexCodetext();
 $complexCodetext->setDataLocation(HIBCPASDataLocation::PATIENT);
 $complexCodetext->addRecord(HIBCPASDataType::LABELER_IDENTIFICATION_CODE, "A123");
 $complexCodetext->addRecord(HIBCPASDataType::MANUFACTURER_SERIAL_NUMBER, "SERIAL123");
 $complexCodetext->setBarcodeType(EncodeTypes::HIBC_DATA_MATRIX_PAS);
 $generator = new ComplexBarcodeGenerator($complexCodetext);
 {
     BarCodeReader reader = new BarCodeReader($generator->generateBarCodeImage(BarCodeImageFormat::PNG), null, DecodeType::HIBC_DATA_MATRIX_PAS);
     {
         $reader->readBarCodes();
         $codetext = $reader->getFoundBarCodes()[0]->getCodeText();
            $readCodetext = ComplexCodetextReader::tryDecodeHIBCPAS($codetext);
        print("Data location: " . $readCodetext->getDataLocation());
         print("Data type: " . $readCodetext->getRecords()[0]->getDataType());
         print("Data: " . $readCodetext->getRecords()[0]->getData());
         print("Data type: " . $readCodetext->getRecords()[1]->getDataType());
         print("Data: " . $readCodetext->getRecords()[1]->getData());
     }
 }
 

Constructor & Destructor Documentation

◆ __construct()

HIBCPASCodetext::__construct ( )

Member Function Documentation

◆ addHIBCPASRecord()

HIBCPASCodetext::addHIBCPASRecord ( HIBCPASRecord  $record)

Adds new record

Parameters
record‪Record to be added

◆ addRecord()

HIBCPASCodetext::addRecord ( int  $dataType,
string  $data 
)

Adds new record

Parameters
dataType‪Type of data
data‪Data string

◆ clear()

HIBCPASCodetext::clear ( )

Clears records list

◆ construct()

static HIBCPASCodetext::construct (   $javaClass)
static

HIBCPASRecord constructor

◆ equals()

HIBCPASCodetext::equals ( HIBCPASCodetext  $obj)

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

value.

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

◆ getBarcodeType()

HIBCPASCodetext::getBarcodeType ( )

Gets barcode type.

Returns
‪Barcode type.

Reimplemented from IComplexCodetext.

◆ getConstructedCodetext()

HIBCPASCodetext::getConstructedCodetext ( )

Constructs codetext

Returns
‪Constructed codetext

Reimplemented from IComplexCodetext.

◆ getDataLocation()

HIBCPASCodetext::getDataLocation ( )

Identifies data location.

◆ getJavaClass()

BaseJavaClass::getJavaClass ( )
inherited

◆ getJavaClassName()

BaseJavaClass::getJavaClassName ( )
inherited

◆ getRecords()

HIBCPASCodetext::getRecords ( )

Gets records list

Returns
‪List of records

◆ hashCode()

HIBCPASCodetext::hashCode ( )

Returns the hash code for this instance.

Returns
‪A 32-bit signed integer hash code.

◆ init()

HIBCPASCodetext::init ( )
protected

Reimplemented from BaseJavaClass.

◆ initFromString()

HIBCPASCodetext::initFromString ( string  $constructedCodetext)

Initializes instance from constructed codetext.

Parameters
constructedCodetext‪Constructed codetext.

Reimplemented from IComplexCodetext.

◆ isNull()

BaseJavaClass::isNull ( )
inherited

◆ printJavaClassName()

BaseJavaClass::printJavaClassName ( )
inherited

◆ setBarcodeType()

HIBCPASCodetext::setBarcodeType ( int  $value)

Gets or sets barcode type. HIBC PAS codetext can be encoded using HIBCCode39PAS, HIBCCode128PAS, HIBCAztec:PAS, HIBCDataMatrixPAS and HIBCQRPAS encode types. Default value: HIBCCode39PAS.

Returns
‪Barcode type.

◆ setDataLocation()

HIBCPASCodetext::setDataLocation ( int  $value)

Identifies data location.

◆ setJavaClass()

BaseJavaClass::setJavaClass (   $javaClass)
protectedinherited

Member Data Documentation

◆ JAVA_CLASS_NAME

const HIBCPASCodetext::JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCPASCodetext"