dolibarr  7.0.0-beta
Public Member Functions | List of all members
modPhpbarcode Class Reference

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

+ Inheritance diagram for modPhpbarcode:
+ Collaboration diagram for modPhpbarcode:

Public Member Functions

 isEnabled ()
 Return if a module can be used or not. More...
 
 info ()
 Return description. More...
 
 canBeActivated ()
 Test si les numeros deja en vigueur dans la base ne provoquent pas de de conflits qui empechera cette numerotation de fonctionner. 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...
 
- Public Member Functions inherited from ModeleBarCode
 isEnabled ()
 Return if a model can be used or not. More...
 

Detailed Description

Class to generate barcode images using php barcode generator.

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

Member Function Documentation

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
integer$scaleScale
integer$nooutputiferrorNo output if error
Returns
int <0 if KO, >0 if OK

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

References barcode_print(), dol_syslog(), encodingIsSupported(), and print.

Referenced by writeBarCode().

modPhpbarcode::canBeActivated ( )

Test si les numeros deja en vigueur dans la base ne provoquent pas de de conflits qui empechera cette numerotation de fonctionner.

Returns
boolean false si conflit, true si ok

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

modPhpbarcode::encodingIsSupported (   $encoding)

Return true if encoding is supported.

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

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

Referenced by buildBarCode().

modPhpbarcode::info ( )

Return description.

Returns
string Texte descripif

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

modPhpbarcode::isEnabled ( )

Return if a module can be used or not.

Returns
boolean true if module can be used

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

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 156 of file phpbarcode.modules.php.

References buildBarCode(), and dol_mkdir().


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