Barcode/Object/Code128.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Barcode
- Subpackage
- Object
- Version
- $Id: Code25.php 20096 2010-01-06 02:05:09Z bkarwin $
\Zend_Barcode_Object_Code128
- Parent(s)
- \Zend_Barcode_Object_ObjectAbstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


\$_addLeadingZeros $_addLeadingZeros = true
true
Details- Type
- \$_addLeadingZeros
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_addLeadingZeros


integer $_backgroundColor = 16777215
16777215
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_backgroundColor


integer $_barHeight = 50
50
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_barHeight


integer $_barThickWidth = 3
3
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_barThickWidth


integer $_barThinWidth = 1
1
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_barThinWidth


\$_barcodeLength $_barcodeLength = null
null
Details- Type
- \$_barcodeLength
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_barcodeLength


string $_barcodeNamespace = 'Zend_Barcode_Object'
'Zend_Barcode_Object'
Details- Type
- string
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_barcodeNamespace


array $_charSets = array('A' => array(' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 'FNC3', 'FNC2', 'SHIFT', 'Code C', 'Code B', 'FNC4', 'FNC1', 'START A', 'START B', 'START C', 'STOP'), 'B' => array(' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 127, 'FNC3', 'FNC2', 'SHIFT', 'Code C', 'FNC4', 'Code A', 'FNC1', 'START A', 'START B', 'START C', 'STOP'), 'C' => array('00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', 'Code B', 'Code A', 'FNC1', 'START A', 'START B', 'START C', 'STOP'))
array('A' => array(' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 'FNC3', 'FNC2', 'SHIFT', 'Code C', 'Code B', 'FNC4', 'FNC1', 'START A', 'START B', 'START C', 'STOP'), 'B' => array(' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 127, 'FNC3', 'FNC2', 'SHIFT', 'Code C', 'FNC4', 'Code A', 'FNC1', 'START A', 'START B', 'START C', 'STOP'), 'C' => array('00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', 'Code B', 'Code A', 'FNC1', 'START A', 'START B', 'START C', 'STOP'))
Details- Type
- array


$_codingMap = array(0 => "11011001100", 1 => "11001101100", 2 => "11001100110", 3 => "10010011000", 4 => "10010001100", 5 => "10001001100", 6 => "10011001000", 7 => "10011000100", 8 => "10001100100", 9 => "11001001000", 10 => "11001000100", 11 => "11000100100", 12 => "10110011100", 13 => "10011011100", 14 => "10011001110", 15 => "10111001100", 16 => "10011101100", 17 => "10011100110", 18 => "11001110010", 19 => "11001011100", 20 => "11001001110", 21 => "11011100100", 22 => "11001110100", 23 => "11101101110", 24 => "11101001100", 25 => "11100101100", 26 => "11100100110", 27 => "11101100100", 28 => "11100110100", 29 => "11100110010", 30 => "11011011000", 31 => "11011000110", 32 => "11000110110", 33 => "10100011000", 34 => "10001011000", 35 => "10001000110", 36 => "10110001000", 37 => "10001101000", 38 => "10001100010", 39 => "11010001000", 40 => "11000101000", 41 => "11000100010", 42 => "10110111000", 43 => "10110001110", 44 => "10001101110", 45 => "10111011000", 46 => "10111000110", 47 => "10001110110", 48 => "11101110110", 49 => "11010001110", 50 => "11000101110", 51 => "11011101000", 52 => "11011100010", 53 => "11011101110", 54 => "11101011000", 55 => "11101000110", 56 => "11100010110", 57 => "11101101000", 58 => "11101100010", 59 => "11100011010", 60 => "11101111010", 61 => "11001000010", 62 => "11110001010", 63 => "10100110000", 64 => "10100001100", 65 => "10010110000", 66 => "10010000110", 67 => "10000101100", 68 => "10000100110", 69 => "10110010000", 70 => "10110000100", 71 => "10011010000", 72 => "10011000010", 73 => "10000110100", 74 => "10000110010", 75 => "11000010010", 76 => "11001010000", 77 => "11110111010", 78 => "11000010100", 79 => "10001111010", 80 => "10100111100", 81 => "10010111100", 82 => "10010011110", 83 => "10111100100", 84 => "10011110100", 85 => "10011110010", 86 => "11110100100", 87 => "11110010100", 88 => "11110010010", 89 => "11011011110", 90 => "11011110110", 91 => "11110110110", 92 => "10101111000", 93 => "10100011110", 94 => "10001011110", 95 => "10111101000", 96 => "10111100010", 97 => "11110101000", 98 => "11110100010", 99 => "10111011110", 100 => "10111101110", 101 => "11101011110", 102 => "11110101110", 103 => "11010000100", 104 => "11010010000", 105 => "11010011100", 106 => "1100011101011")
array(0 => "11011001100", 1 => "11001101100", 2 => "11001100110", 3 => "10010011000", 4 => "10010001100", 5 => "10001001100", 6 => "10011001000", 7 => "10011000100", 8 => "10001100100", 9 => "11001001000", 10 => "11001000100", 11 => "11000100100", 12 => "10110011100", 13 => "10011011100", 14 => "10011001110", 15 => "10111001100", 16 => "10011101100", 17 => "10011100110", 18 => "11001110010", 19 => "11001011100", 20 => "11001001110", 21 => "11011100100", 22 => "11001110100", 23 => "11101101110", 24 => "11101001100", 25 => "11100101100", 26 => "11100100110", 27 => "11101100100", 28 => "11100110100", 29 => "11100110010", 30 => "11011011000", 31 => "11011000110", 32 => "11000110110", 33 => "10100011000", 34 => "10001011000", 35 => "10001000110", 36 => "10110001000", 37 => "10001101000", 38 => "10001100010", 39 => "11010001000", 40 => "11000101000", 41 => "11000100010", 42 => "10110111000", 43 => "10110001110", 44 => "10001101110", 45 => "10111011000", 46 => "10111000110", 47 => "10001110110", 48 => "11101110110", 49 => "11010001110", 50 => "11000101110", 51 => "11011101000", 52 => "11011100010", 53 => "11011101110", 54 => "11101011000", 55 => "11101000110", 56 => "11100010110", 57 => "11101101000", 58 => "11101100010", 59 => "11100011010", 60 => "11101111010", 61 => "11001000010", 62 => "11110001010", 63 => "10100110000", 64 => "10100001100", 65 => "10010110000", 66 => "10010000110", 67 => "10000101100", 68 => "10000100110", 69 => "10110010000", 70 => "10110000100", 71 => "10011010000", 72 => "10011000010", 73 => "10000110100", 74 => "10000110010", 75 => "11000010010", 76 => "11001010000", 77 => "11110111010", 78 => "11000010100", 79 => "10001111010", 80 => "10100111100", 81 => "10010111100", 82 => "10010011110", 83 => "10111100100", 84 => "10011110100", 85 => "10011110010", 86 => "11110100100", 87 => "11110010100", 88 => "11110010010", 89 => "11011011110", 90 => "11011110110", 91 => "11110110110", 92 => "10101111000", 93 => "10100011110", 94 => "10001011110", 95 => "10111101000", 96 => "10111100010", 97 => "11110101000", 98 => "11110100010", 99 => "10111011110", 100 => "10111101110", 101 => "11101011110", 102 => "11110101110", 103 => "11010000100", 104 => "11010010000", 105 => "11010011100", 106 => "1100011101011")
Details- Type
- n/a


boolean $_drawText = true
true
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_drawText


integer $_factor = 1
1
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_factor


integer|string $_font = null
null
Details- Type
- integer | string
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_font


float $_fontSize = 10
10
Details- Type
- float
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_fontSize


integer $_foreColor = 0
0
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_foreColor


integer $_height = null
null
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_height


array $_instructions = array()
array()
Details- Type
- array
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_instructions


\$_mandatoryChecksum $_mandatoryChecksum = false
false
Details- Type
- \$_mandatoryChecksum
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_mandatoryChecksum


boolean $_mandatoryQuietZones = false
false
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_mandatoryQuietZones


integer $_offsetLeft = null
null
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_offsetLeft


integer $_offsetTop = null
null
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_offsetTop


float $_orientation = 0
0
Details- Type
- float
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_orientation


string $_staticFont = null
null
Details- Type
- string
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_staticFont


boolean $_stretchText = false
false
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_stretchText


\$_substituteChecksumCharacter $_substituteChecksumCharacter = 0
0
Details- Type
- \$_substituteChecksumCharacter
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_substituteChecksumCharacter


string $_text = null
null
Details- Type
- string
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_text


string $_type = null
null
Details- Type
- string
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_type


integer $_width = null
null
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_width


boolean $_withBorder = false
false
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_withBorder


boolean $_withChecksum = true
true
Details- Type
- boolean


boolean $_withChecksumInText = false
false
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_withChecksumInText


boolean $_withQuietZones = true
true
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_withQuietZones
Methods


__construct(array | \Zend_Config $options = null) : void
Name | Type | Description |
---|---|---|
$options | array | \Zend_Config |


_addInstruction(array $instruction) : void
Add an instruction in the array of instructions
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_addInstruction()Name | Type | Description |
---|---|---|
$instruction | array |


_addLeadingZeros(string $text, boolean $withoutChecksum = false) : void
Automatically add leading zeros if barcode length is fixed
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_addLeadingZeros()Name | Type | Description |
---|---|---|
$text | string | |
$withoutChecksum | boolean |


_addPolygon(array $points, integer $color = null, boolean $filled = true) : void
Add a polygon drawing instruction in the set of instructions
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_addPolygon()Name | Type | Description |
---|---|---|
$points | array | |
$color | integer | |
$filled | boolean |


_addText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float $orientation = 0) : void
Add a text drawing instruction in the set of instructions
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_addText()Name | Type | Description |
---|---|---|
$text | string | |
$size | float | |
$position | array | |
$font | string | |
$color | integer | |
$alignment | string | |
$orientation | float |


_calculateBarcodeHeight() : integer
Height of the barcode
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_calculateBarcodeHeight()Type | Description |
---|---|
integer |


_calculateHeight() : integer
Height of the result object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_calculateHeight()Type | Description |
---|---|
integer |


_calculateWidth() : integer
Width of the result image (before any rotation)
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_calculateWidth()Type | Description |
---|---|
integer |


_checkFontAndOrientation() : void
Drawing with an angle is just allow TTF font
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_checkFontAndOrientation()- Throw


_checkRatio(integer $min = 2, integer $max = 3) : void
Check the ratio between the thick and the thin bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_checkRatio()Name | Type | Description |
---|---|---|
$min | integer | |
$max | integer |
- Throw


_checkText( $value = null) : void
Check if a text is really provided to barcode
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_checkText()Name | Type | Description |
---|---|---|
$value |
- Throw


_convertToBarcodeChars( $string) : array
Convert string to barcode string
Name | Type | Description |
---|---|---|
$string |
Type | Description |
---|---|
array |


_drawBorder() : void
Partial function to draw border
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_drawBorder()

_drawText() : void
Partial function to draw text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_drawText()

_getDefaultOptions() : void
Set default options for particular object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_getDefaultOptions()

_isDigit(string $string, int $pos, int $length = 2) : bool
Checks if the next $length chars of $string starting at $pos are numeric.
Returns false if the end of the string is reached.
Name | Type | Description |
---|---|---|
$string | string | String to search |
$pos | int | Starting position |
$length | int | Length to search |
Type | Description |
---|---|
bool |


_postDrawBarcode() : void
Allow each child to draw something else (ex: bearer bars in interleaved 2 of 5 code)
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_postDrawBarcode()

_preDrawBarcode() : void
Allow each child to draw something else
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_preDrawBarcode()

_rotate(float $x1, float $y1) : array
Apply rotation on a point in X/Y dimensions
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_rotate()Name | Type | Description |
---|---|---|
$x1 | float | x-position before rotation |
$y1 | float | y-position before rotation |
Type | Description |
---|---|
array | Array of two elements corresponding to the new XY point |


_validateText(string $value, array $options = array()) : void
Standard validation for most of barcode objects
Name | Type | Description |
---|---|---|
$value | string | |
$options | array |


checkParams() : void
Checking of parameters after all settings
Inherited from: \Zend_Barcode_Object_ObjectAbstract::checkParams()

getBackgroundColor() : integer
Retrieve background color of the image
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getBackgroundColor()Type | Description |
---|---|
integer |


getBarHeight() : integer
Get height of the barcode bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getBarHeight()Type | Description |
---|---|
integer |


getBarThickWidth() : integer
Get thickness of thick bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getBarThickWidth()Type | Description |
---|---|
integer |


getBarThinWidth() : integer
Get thickness of thin bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getBarThinWidth()Type | Description |
---|---|
integer |


getBarcodeNamespace() : string
Retrieve barcode namespace
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getBarcodeNamespace()Type | Description |
---|---|
string |


getChecksum(string $text) : int
Get barcode checksum
Name | Type | Description |
---|---|---|
$text | string |
Type | Description |
---|---|
int |


getDrawText() : boolean
Retrieve if drawing of text to encode is enabled
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getDrawText()Type | Description |
---|---|
boolean |


getFactor() : integer
Get factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getFactor()Type | Description |
---|---|
integer |


getFontSize() : float
Retrieve the size of the font in case of TTF
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getFontSize()Type | Description |
---|---|
float |


getForeColor() : \unknown
Retrieve color of the barcode and text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getForeColor()Type | Description |
---|---|
\unknown |


getHeight( $recalculate = false) : integer
Get height of the result object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getHeight()Name | Type | Description |
---|---|---|
$recalculate |
Type | Description |
---|---|
integer |


getInstructions() : array
Retrieve the set of drawing instructions
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getInstructions()Type | Description |
---|---|
array |


getOffsetLeft(boolean $recalculate = false) : float
Calculate the offset from the left of the object if an orientation is activated
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getOffsetLeft()Name | Type | Description |
---|---|---|
$recalculate | boolean |
Type | Description |
---|---|
float |


getOffsetTop(boolean $recalculate = false) : float
Calculate the offset from the top of the object if an orientation is activated
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getOffsetTop()Name | Type | Description |
---|---|---|
$recalculate | boolean |
Type | Description |
---|---|
float |


getOrientation() : float
Retrieve orientation of barcode and text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getOrientation()Type | Description |
---|---|
float |


getQuietZone() : integer
Quiet zone before first bar and after the last bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getQuietZone()Type | Description |
---|---|
integer |


getStretchText() : boolean
Retrieve if the adjustment of the position of the characters to the position of the bars is enabled
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getStretchText()Type | Description |
---|---|
boolean |


getTextToDisplay() : string
Retrieve text to display
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getTextToDisplay()Type | Description |
---|---|
string |


getWidth( $recalculate = false) : integer
Get width of the result object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getWidth()Name | Type | Description |
---|---|---|
$recalculate |
Type | Description |
---|---|
integer |


getWithBorder() : boolean
Retrieve if border are draw or not
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getWithBorder()Type | Description |
---|---|
boolean |


getWithChecksum() : boolean
Retrieve if the checksum character is automatically added to the barcode text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getWithChecksum()Type | Description |
---|---|
boolean |


getWithChecksumInText() : boolean
Retrieve if the checksum character is automatically added to the barcode text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getWithChecksumInText()Type | Description |
---|---|
boolean |


getWithQuietZones() : boolean
Retrieve if quiet zones are draw or not
Inherited from: \Zend_Barcode_Object_ObjectAbstract::getWithQuietZones()Type | Description |
---|---|
boolean |


setBackgroundColor(integer $value) : \Zend_Barcode_Object
Set the color of the background
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setBackgroundColor()Name | Type | Description |
---|---|---|
$value | integer |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setBarHeight(integer $value) : \Zend_Barcode_Object
Set height of the barcode bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setBarHeight()Name | Type | Description |
---|---|---|
$value | integer |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setBarThickWidth(integer $value) : \Zend_Barcode_Object
Set thickness of thick bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setBarThickWidth()Name | Type | Description |
---|---|---|
$value | integer |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setBarThinWidth(integer $value) : \Zend_Barcode_Object
Set thickness of thin bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setBarThinWidth()Name | Type | Description |
---|---|---|
$value | integer |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setBarcodeFont(string $font) : void
Set the font for all instances of barcode
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setBarcodeFont()Name | Type | Description |
---|---|---|
$font | string |


setBarcodeNamespace(string $namespace) : \Zend_Barcode_Object
Set barcode namespace for autoloading
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setBarcodeNamespace()Name | Type | Description |
---|---|---|
$namespace | string |
Type | Description |
---|---|
\Zend_Barcode_Object |


setConfig(\Zend_Config $config) : \Zend_Barcode_Object
Set barcode state from config object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setConfig()Name | Type | Description |
---|---|---|
$config | \Zend_Config |
Type | Description |
---|---|
\Zend_Barcode_Object |


setDrawText(boolean $value) : \Zend_Barcode_Object
Activate/deactivate drawing of text to encode
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setDrawText()Name | Type | Description |
---|---|---|
$value | boolean |
Type | Description |
---|---|
\Zend_Barcode_Object |


setFactor(float $value) : \Zend_Barcode_Object
Set factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setFactor()Name | Type | Description |
---|---|---|
$value | float |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setFont(integer | string $value) : \Zend_Barcode_Object
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
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setFont()Name | Type | Description |
---|---|---|
$value | integer | string |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setFontSize(float $value) : \Zend_Barcode_Object
Set the size of the font in case of TTF
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setFontSize()Name | Type | Description |
---|---|---|
$value | float |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setForeColor(string $value) : \Zend_Barcode_Object
Set color of the barcode and text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setForeColor()Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setOptions(array $options) : \Zend_Barcode_Object
Set barcode state from options array
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setOptions()Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Barcode_Object |


setOrientation(float $value) : \Zend_Barcode_Object
Set orientation of barcode and text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setOrientation()Name | Type | Description |
---|---|---|
$value | float |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setReverseColor() : \Zend_Barcode_Object
Allow fast inversion of font/bars color and background color
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setReverseColor()Type | Description |
---|---|
\Zend_Barcode_Object |


setStretchText(boolean $value) : \Zend_Barcode_Object
Activate/deactivate the adjustment of the position of the characters to the position of the bars
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setStretchText()Name | Type | Description |
---|---|---|
$value | boolean |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setText(string $value) : \Zend_Barcode_Object
Set text to encode
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
\Zend_Barcode_Object |


setWithBorder(boolean $value) : \Zend_Barcode_Object
Activate/deactivate drawing of the bar
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setWithBorder()Name | Type | Description |
---|---|---|
$value | boolean |
Type | Description |
---|---|
\Zend_Barcode_Object |


setWithChecksum(boolean $value) : \Zend_Barcode_Object
Activate/deactivate the automatic generation of the checksum character added to the barcode text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setWithChecksum()Name | Type | Description |
---|---|---|
$value | boolean |
Type | Description |
---|---|
\Zend_Barcode_Object |


setWithChecksumInText(boolean $value) : \Zend_Barcode_Object
Activate/deactivate the automatic generation of the checksum character added to the barcode text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setWithChecksumInText()Name | Type | Description |
---|---|---|
$value | boolean |
Type | Description |
---|---|
\Zend_Barcode_Object |
- Throw


setWithQuietZones(boolean $value) : \Zend_Barcode_Object
Activate/deactivate drawing of the quiet zones
Inherited from: \Zend_Barcode_Object_ObjectAbstract::setWithQuietZones()Name | Type | Description |
---|---|---|
$value | boolean |
Type | Description |
---|---|
\Zend_Barcode_Object |


validateText(string $value) : void
Check for invalid characters
Inherited from: \Zend_Barcode_Object_ObjectAbstract::validateText()Name | Type | Description |
---|---|---|
$value | string | Text to be ckecked |