Fully Qualified Name: | Zend\Barcode\Object\Code128 |
Extends: | AbstractObject |
Class for generate Code128 barcode
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | AbstractObject |
checkParams() | Checking of parameters after all settings | AbstractObject |
draw() | Complete drawing of the barcode | AbstractObject |
getBackgroundColor() | Retrieve background color of the image | AbstractObject |
getBarHeight() | Get height of the barcode bar | AbstractObject |
getBarThickWidth() | Get thickness of thick bar | AbstractObject |
getBarThinWidth() | Get thickness of thin bar | AbstractObject |
getBarcodeNamespace() | Retrieve barcode namespace | AbstractObject |
getChecksum() | Get barcode checksum | Code128 |
getDrawText() | Retrieve if drawing of text to encode is enabled | AbstractObject |
getFactor() | Get factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize | AbstractObject |
getFont() | Retrieve the font | AbstractObject |
getFontSize() | Retrieve the size of the font in case of TTF | AbstractObject |
getForeColor() | Retrieve color of the barcode and text | AbstractObject |
getHeight() | Get height of the result object | AbstractObject |
getInstructions() | Retrieve the set of drawing instructions | AbstractObject |
getOffsetLeft() | Calculate the offset from the left of the object if an orientation is activated | AbstractObject |
getOffsetTop() | Calculate the offset from the top of the object if an orientation is activated | AbstractObject |
getOrientation() | Retrieve orientation of barcode and text | AbstractObject |
getQuietZone() | Quiet zone before first bar and after the last bar | AbstractObject |
getRawText() | Retrieve text to encode | AbstractObject |
getStretchText() | Retrieve if the adjustment of the position of the characters to the position of the bars is enabled | AbstractObject |
getText() | Retrieve text to encode | Code128 |
getTextToDisplay() | Retrieve text to display | AbstractObject |
getType() | Retrieve type of barcode | AbstractObject |
getWidth() | Get width of the result object | AbstractObject |
getWithBorder() | Retrieve if border are draw or not | AbstractObject |
getWithChecksum() | Retrieve if the checksum character is automatically added to the barcode text | AbstractObject |
getWithChecksumInText() | Retrieve if the checksum character is automatically added to the barcode text | AbstractObject |
getWithQuietZones() | Retrieve if quiet zones are draw or not | AbstractObject |
setBackgroundColor() | Set the color of the background | AbstractObject |
setBarHeight() | Set height of the barcode bar | AbstractObject |
setBarThickWidth() | Set thickness of thick bar | AbstractObject |
setBarThinWidth() | Set thickness of thin bar | AbstractObject |
setBarcodeNamespace() | Set barcode namespace for autoloading | AbstractObject |
setDrawText() | Activate/deactivate drawing of text to encode | AbstractObject |
setFactor() | Set factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize | AbstractObject |
setFont() | Set the font: - if integer between 1 and 5, use gd built-in fonts - if string, $value is assumed to be the path to a TTF font | AbstractObject |
setFontSize() | Set the size of the font in case of TTF | AbstractObject |
setForeColor() | Set color of the barcode and text | AbstractObject |
setOptions() | Set barcode state from options array | AbstractObject |
setOrientation() | Set orientation of barcode and text | AbstractObject |
setReverseColor() | Allow fast inversion of font/bars color and background color | AbstractObject |
setStretchText() | Activate/deactivate the adjustment of the position of the characters to the position of the bars | AbstractObject |
setText() | Set text to encode | Code128 |
setWithBorder() | Activate/deactivate drawing of the bar | AbstractObject |
setWithChecksum() | Activate/deactivate the automatic generation of the checksum character added to the barcode text | AbstractObject |
setWithChecksumInText() | Activate/deactivate the automatic generation of the checksum character added to the barcode text | AbstractObject |
setWithQuietZones() | Activate/deactivate drawing of the quiet zones | AbstractObject |
validateText() | Check for invalid characters | AbstractObject |
Constructor
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable |
Returns:
Checking of parameters after all settings
Returns: bool
Complete drawing of the barcode
Returns: array Table of instructions
Retrieve background color of the image
Returns: int
Get height of the barcode bar
Returns: int
Get thickness of thick bar
Returns: int
Get thickness of thin bar
Returns: int
Retrieve barcode namespace
Returns: string
Get barcode checksum
Parameter Name | Type | Description |
---|---|---|
$text | string |
Returns: int
Retrieve if drawing of text to encode is enabled
Returns: bool
Get factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize
Returns: int
Retrieve the font
Returns: int|string
Retrieve the size of the font in case of TTF
Returns: float
Retrieve color of the barcode and text
Returns: int
Get height of the result object
Parameter Name | Type | Description |
---|---|---|
$recalculate | bool |
Returns: int
Retrieve the set of drawing instructions
Returns: array
Calculate the offset from the left of the object if an orientation is activated
Parameter Name | Type | Description |
---|---|---|
$recalculate | bool |
Returns: float
Calculate the offset from the top of the object if an orientation is activated
Parameter Name | Type | Description |
---|---|---|
$recalculate | bool |
Returns: float
Retrieve orientation of barcode and text
Returns: float
Quiet zone before first bar and after the last bar
Returns: int
Retrieve text to encode
Returns: string
Retrieve if the adjustment of the position of the characters to the position of the bars is enabled
Returns: bool
Retrieve text to encode
Returns: string
Retrieve text to display
Returns: string
Retrieve type of barcode
Returns: string
Get width of the result object
Parameter Name | Type | Description |
---|---|---|
$recalculate | bool |
Returns: int
Retrieve if border are draw or not
Returns: bool
Retrieve if the checksum character is automatically added to the barcode text
Returns: bool
Retrieve if the checksum character is automatically added to the barcode text
Returns: bool
Retrieve if quiet zones are draw or not
Returns: bool
Set the color of the background
Parameter Name | Type | Description |
---|---|---|
$value | int |
Returns: self Provides a fluent interface
Set height of the barcode bar
Parameter Name | Type | Description |
---|---|---|
$value | int |
Returns: self Provides a fluent interface
Set thickness of thick bar
Parameter Name | Type | Description |
---|---|---|
$value | int |
Returns: self Provides a fluent interface
Set thickness of thin bar
Parameter Name | Type | Description |
---|---|---|
$value | int |
Returns: self Provides a fluent interface
Set barcode namespace for autoloading
Parameter Name | Type | Description |
---|---|---|
$namespace | string |
Returns: self Provides a fluent interface
Activate/deactivate drawing of text to encode
Parameter Name | Type | Description |
---|---|---|
$value | bool |
Returns: self Provides a fluent interface
Set factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize
Parameter Name | Type | Description |
---|---|---|
$value | int|float|string|bool |
Returns: self Provides a fluent interface
Set the font: - if integer between 1 and 5, use gd built-in fonts - if string, $value is assumed to be the path to a TTF font
Parameter Name | Type | Description |
---|---|---|
$value | int|string |
Returns: self Provides a fluent interface
Set the size of the font in case of TTF
Parameter Name | Type | Description |
---|---|---|
$value | float |
Returns: self Provides a fluent interface
Set color of the barcode and text
Parameter Name | Type | Description |
---|---|---|
$value | string |
Returns: self Provides a fluent interface
Set barcode state from options array
Parameter Name | Type | Description |
---|---|---|
$options | array |
Returns: self Provides a fluent interface
Set orientation of barcode and text
Parameter Name | Type | Description |
---|---|---|
$value | int|float|string|bool |
Returns: self Provides a fluent interface
Allow fast inversion of font/bars color and background color
Returns: self Provides a fluent interface
Activate/deactivate the adjustment of the position of the characters to the position of the bars
Parameter Name | Type | Description |
---|---|---|
$value | bool |
Returns: self Provides a fluent interface
Set text to encode
Parameter Name | Type | Description |
---|---|---|
$value | string |
Returns: self Provides a fluent interface
Activate/deactivate drawing of the bar
Parameter Name | Type | Description |
---|---|---|
$value | bool |
Returns: self Provides a fluent interface
Activate/deactivate the automatic generation of the checksum character added to the barcode text
Parameter Name | Type | Description |
---|---|---|
$value | bool |
Returns: self Provides a fluent interface
Activate/deactivate the automatic generation of the checksum character added to the barcode text
Parameter Name | Type | Description |
---|---|---|
$value | bool |
Returns: self Provides a fluent interface
Activate/deactivate drawing of the quiet zones
Parameter Name | Type | Description |
---|---|---|
$value | bool |
Returns: self Provides a fluent interface
Check for invalid characters
Parameter Name | Type | Description |
---|---|---|
$value | string | Text |
Returns: