class modPhpbarcode extends ModeleBarCode (View source)

Class to generate barcode images using php barcode generator

Properties

string $error
string $version

Dolibarr version of the loaded document

Methods

bool
isEnabled()

Return if a module can be used or not

string
info($langs)

Return description

int
writeBarCode(string $code, string $encoding, string $readable = 'Y', int $scale = 1, $nooutputiferror = 0)

Save an image file on disk (with no output)

int
buildBarCode(string $code, string $encoding, string $readable = 'Y', int $scale = 1, $nooutputiferror = 0)

Return an image file on the fly (no need to write on disk) with the HTTP content-type of image.

int
encodingIsSupported($encoding)

Return true if encoding is supported

canBeActivated(object $object)

Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working.

Details

bool isEnabled()

Return if a module can be used or not

@return boolean true if module can be used

Return Value

bool

true if model can be used

string info($langs)

Return description

Parameters

$langs

Return Value

string

Descriptive text

int writeBarCode(string $code, string $encoding, string $readable = 'Y', int $scale = 1, $nooutputiferror = 0)

Save an image file on disk (with no output)

Parameters

string $code

Value to encode

string $encoding

Mode of encoding ('QRCODE', 'EAN13', ...)

string $readable

Code can be read

int $scale

Scale (not used with this engine) @param integer $nooutputiferror No output if error (not used with this engine)

$nooutputiferror

Return Value

int

Return integer <0 if KO, >0 if OK

int buildBarCode(string $code, string $encoding, string $readable = 'Y', int $scale = 1, $nooutputiferror = 0)

Return an image file on the fly (no need to write on disk) with the HTTP content-type of image.

Parameters

string $code

Value to encode

string $encoding

Mode of encoding

string $readable

Code can be read (What is this ? is this used ?)

int $scale

Scale @param integer $nooutputiferror No output if error

$nooutputiferror

Return Value

int

Return integer <0 if KO, >0 if OK

int encodingIsSupported($encoding)

Return true if encoding is supported

Parameters

$encoding

Return Value

int

0 if supported, 0 if not

canBeActivated(object $object)

Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working.

Parameters

object $object

Object we need next value for @return boolean false if KO (there is a conflict), true if OK