ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
TCPDF2DBarcode Class Reference
+ Collaboration diagram for TCPDF2DBarcode:

Public Member Functions

 __construct ($code, $type)
 This is the class constructor.
 getBarcodeArray ()
 Return an array representations of barcode.
 setBarcode ($code, $type)
 Set the barcode.

Protected Attributes

 $barcode_array

Detailed Description

Definition at line 62 of file 2dbarcodes.php.

Constructor & Destructor Documentation

TCPDF2DBarcode::__construct (   $code,
  $type 
)

This is the class constructor.

Return an array representations for 2D barcodes:

  • $arrcode['code'] code to be printed on text label
  • $arrcode['num_rows'] required number of rows
  • $arrcode['num_cols'] required number of columns
  • $arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)
Parameters
string$codecode to print
string$typetype of barcode:
  • TEST
  • ...TO BE IMPLEMENTED

Definition at line 80 of file 2dbarcodes.php.

References $type, and setBarcode().

{
$this->setBarcode($code, $type);
}

+ Here is the call graph for this function:

Member Function Documentation

TCPDF2DBarcode::getBarcodeArray ( )

Return an array representations of barcode.

Returns
array

Definition at line 88 of file 2dbarcodes.php.

References $barcode_array.

{
}
TCPDF2DBarcode::setBarcode (   $code,
  $type 
)

Set the barcode.

Parameters
string$codecode to print
string$typetype of barcode:
  • TEST
  • ...TO BE IMPLEMENTED
Returns
array

Definition at line 98 of file 2dbarcodes.php.

References $type.

Referenced by __construct().

{
$mode = explode(',', $type);
switch (strtoupper($mode[0])) {
case 'TEST': { // TEST MODE
$this->barcode_array['num_rows'] = 5;
$this->barcode_array['num_cols'] = 15;
$this->barcode_array['bcode'] = array(
array(1,1,1,0,1,1,1,0,1,1,1,0,1,1,1),
array(0,1,0,0,1,0,0,0,1,0,0,0,0,1,0),
array(0,1,0,0,1,1,0,0,1,1,1,0,0,1,0),
array(0,1,0,0,1,0,0,0,0,0,1,0,0,1,0),
array(0,1,0,0,1,1,1,0,1,1,1,0,0,1,0)
);
break;
}
// ... Add here real 2D barcodes ...
default: {
$this->barcode_array = false;
}
}
}

+ Here is the caller graph for this function:

Field Documentation

TCPDF2DBarcode::$barcode_array
protected

Definition at line 68 of file 2dbarcodes.php.

Referenced by getBarcodeArray().


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