dolibarr  19.0.0-dev
Public Member Functions | List of all members
modPhpbarcode Class Reference

Class to generate barcode images using php barcode generator. More...

Inheritance diagram for modPhpbarcode:
Inheritance graph
[legend]
Collaboration diagram for modPhpbarcode:
Collaboration graph
[legend]

Public Member Functions

 isEnabled ()
 Return if a module can be used or not. More...
 
 info ()
 Return description. More...
 
 canBeActivated ()
 Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working. More...
 
 encodingIsSupported ($encoding)
 Return true if encoding is supported. More...
 
 buildBarCode ($code, $encoding, $readable='Y', $scale=1, $nooutputiferror=0)
 Return an image file on the fly (no need to write on disk) More...
 
 writeBarCode ($code, $encoding, $readable='Y', $scale=1, $nooutputiferror=0)
 Save an image file on disk (with no output) More...
 

Detailed Description

Class to generate barcode images using php barcode generator.

Definition at line 33 of file phpbarcode.modules.php.

Member Function Documentation

◆ buildBarCode()

modPhpbarcode::buildBarCode (   $code,
  $encoding,
  $readable = 'Y',
  $scale = 1,
  $nooutputiferror = 0 
)

Return an image file on the fly (no need to write on disk)

Parameters
string$codeValue to encode
string$encodingMode of encoding
string$readableCode can be read (What is this ? is this used ?)
integer$scaleScale
integer$nooutputiferrorNo output if error
Returns
int <0 if KO, >0 if OK

Definition at line 134 of file phpbarcode.modules.php.

◆ canBeActivated()

modPhpbarcode::canBeActivated ( )

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

Returns
boolean false if conflict, true if ok

Definition at line 79 of file phpbarcode.modules.php.

◆ encodingIsSupported()

modPhpbarcode::encodingIsSupported (   $encoding)

Return true if encoding is supported.

Parameters
string$encodingEncoding norm
Returns
int >0 if supported, 0 if not

Definition at line 93 of file phpbarcode.modules.php.

◆ info()

modPhpbarcode::info ( )

Return description.

Returns
string Descriptive text

Definition at line 63 of file phpbarcode.modules.php.

◆ isEnabled()

modPhpbarcode::isEnabled ( )

Return if a module can be used or not.

Returns
boolean true if module can be used

Reimplemented from ModeleBarCode.

Definition at line 52 of file phpbarcode.modules.php.

◆ writeBarCode()

modPhpbarcode::writeBarCode (   $code,
  $encoding,
  $readable = 'Y',
  $scale = 1,
  $nooutputiferror = 0 
)

Save an image file on disk (with no output)

Parameters
string$codeValue to encode
string$encodingMode of encoding
string$readableCode can be read
integer$scaleScale
integer$nooutputiferrorNo output if error
Returns
int <0 if KO, >0 if OK

Definition at line 184 of file phpbarcode.modules.php.


The documentation for this class was generated from the following file: