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

Inherits BaseJavaClass.

Public Member Functions

 getReadingQuality ()
 
 getConfidence ()
 
 getCodeText ()
 
 getCodeBytes ()
 
 getCodeType ()
 
 getCodeTypeName ()
 
 getRegion ()
 
 getExtended ()
 
 equals (BarCodeResult $other)
 
 hashCode ()
 
 toString ()
 
 deepClone ()
 
 __construct ($javaClass)
 
- Public Member Functions inherited from BaseJavaClass
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Protected Member Functions

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

Private Attributes

 $region
 
 $extended
 

Detailed Description

Stores recognized barcode data like SingleDecodeType type, {string} codetext, BarCodeRegionParameters region and other parameters

This sample shows how to obtain BarCodeResult.

$generator = new BarcodeGenerator(EncodeTypes::Code128, "12345");
$generator->save("test.png");
foreach($reader->readBarCodes() as $result)
{
print("BarCode Type: ".$result->getCodeTypeName());
print("BarCode CodeText: ".$result->getCodeText());
print("BarCode Confidence: ".$result->getConfidence());
print("BarCode ReadingQuality: ".$result->getReadingQuality());
print("BarCode Angle: ".$result->getRegion()->getAngle());
}

Constructor & Destructor Documentation

◆ __construct()

BarCodeResult::__construct (   $javaClass)

Creates a a copy of the BarCodeResult class.

Parameters
resultAn copy BarCodeResult instance.TODO

Reimplemented from BaseJavaClass.

Member Function Documentation

◆ deepClone()

BarCodeResult::deepClone ( )

Creates a copy of BarCodeResult class.

Returns
BarCodeResult Returns copy of BarCodeResult class.

◆ equals()

BarCodeResult::equals ( BarCodeResult  $other)

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

Parameters
BarCodeResult$otherAn BarCodeResult value to compare to this instance.
Returns
bool true if obj has the same value as this instance; otherwise, false.
Exceptions
BarcodeException

◆ getCodeBytes()

BarCodeResult::getCodeBytes ( )
Returns
array Gets the encoded code bytes Value: The code bytes of the barcode
Exceptions
BarcodeException

◆ getCodeText()

BarCodeResult::getCodeText ( )
Returns
string Gets the code text Value: The code text of the barcode
Exceptions
BarcodeException

◆ getCodeType()

BarCodeResult::getCodeType ( )
Returns
int Gets the barcode type Value: The type information of the recognized barcode
Exceptions
BarcodeException

◆ getCodeTypeName()

BarCodeResult::getCodeTypeName ( )
Returns
string Gets the name of the barcode type Value: The type name of the recognized barcode
Exceptions
BarcodeException

◆ getConfidence()

BarCodeResult::getConfidence ( )
Returns
int Gets recognition confidence level of the recognized barcode Value: BarCodeConfidence.Strong does not have fakes or misrecognitions, BarCodeConfidence.Moderate could sometimes have fakes or incorrect codetext because this confidence level for barcodews with weak cheksum or even without it, BarCodeConfidence.None always has incorrect codetext and could be fake recognitions
Exceptions
BarcodeException

◆ getExtended()

BarCodeResult::getExtended ( )
Returns
BarCodeExtendedParameters Gets extended parameters of recognized barcode Value: The extended parameters of recognized barcode

◆ getReadingQuality()

BarCodeResult::getReadingQuality ( )
Returns
float Gets the reading quality. Works for 1D and postal barcodes. Value: The reading quality percent
Exceptions
BarcodeException

◆ getRegion()

BarCodeResult::getRegion ( )
Returns
BarCodeRegionParameters Gets the barcode region Value: The region of the recognized barcode
Exceptions
BarcodeException

◆ hashCode()

BarCodeResult::hashCode ( )

Returns the hash code for this instance.

Returns
int A 32-bit signed integer hash code.

◆ init()

BarCodeResult::init ( )
protected

Reimplemented from BaseJavaClass.

◆ toString()

BarCodeResult::toString ( )

Returns a human-readable string representation of this BarCodeResult.

Returns
string A string that represents this BarCodeResult.

Member Data Documentation

◆ $extended

BarCodeResult::$extended
private

◆ $region

BarCodeResult::$region
private