Barcode/Object/Royalmail.php
Zend Framework
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 [email protected] 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: Royalmail.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Barcode_Object_Royalmail
Class for generate Royal maim barcode
- 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
Activate automatic addition of leading zeros if barcode length is fixed
<p>boolean</p>Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_addLeadingZerostrue
Details- Type
- \$_addLeadingZeros
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_addLeadingZeros


integer $_backgroundColor = 16777215
Background color of the object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_backgroundColor16777215
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
Fix barcode length (numeric or string like 'even')
<p>integer | string</p>Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_barcodeLengthnull
Details- Type
- \$_barcodeLength
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_barcodeLength


string $_barcodeNamespace = 'Zend_Barcode_Object'
Namespace of the barcode for autoloading
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_barcodeNamespace'Zend_Barcode_Object'
Details- Type
- string
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_barcodeNamespace


array $_codingMap = array('0' => '3300', '1' => '3210', '2' => '3201', '3' => '2310', '4' => '2301', '5' => '2211', '6' => '3120', '7' => '3030', '8' => '3021', '9' => '2130', 'A' => '2121', 'B' => '2031', 'C' => '3102', 'D' => '3012', 'E' => '3003', 'F' => '2112', 'G' => '2103', 'H' => '2013', 'I' => '1320', 'J' => '1230', 'K' => '1221', 'L' => '0330', 'M' => '0321', 'N' => '0231', 'O' => '1302', 'P' => '1212', 'Q' => '1203', 'R' => '0312', 'S' => '0303', 'T' => '0213', 'U' => '1122', 'V' => '1032', 'W' => '1023', 'X' => '0132', 'Y' => '0123', 'Z' => '0033')
Coding map - 0 = Tracker, Ascender and Descender - 1 = Tracker and Ascender - 2 = Tracker and Descender - 3 = Tracker
array('0' => '3300', '1' => '3210', '2' => '3201', '3' => '2310', '4' => '2301', '5' => '2211', '6' => '3120', '7' => '3030', '8' => '3021', '9' => '2130', 'A' => '2121', 'B' => '2031', 'C' => '3102', 'D' => '3012', 'E' => '3003', 'F' => '2112', 'G' => '2103', 'H' => '2013', 'I' => '1320', 'J' => '1230', 'K' => '1221', 'L' => '0330', 'M' => '0321', 'N' => '0231', 'O' => '1302', 'P' => '1212', 'Q' => '1203', 'R' => '0312', 'S' => '0303', 'T' => '0213', 'U' => '1122', 'V' => '1032', 'W' => '1023', 'X' => '0132', 'Y' => '0123', 'Z' => '0033')
Details- Type
- array


$_columns = array('0' => 1, '1' => 2, '2' => 3, '3' => 4, '4' => 5, '5' => 0, '6' => 1, '7' => 2, '8' => 3, '9' => 4, 'A' => 5, 'B' => 0, 'C' => 1, 'D' => 2, 'E' => 3, 'F' => 4, 'G' => 5, 'H' => 0, 'I' => 1, 'J' => 2, 'K' => 3, 'L' => 4, 'M' => 5, 'N' => 0, 'O' => 1, 'P' => 2, 'Q' => 3, 'R' => 4, 'S' => 5, 'T' => 0, 'U' => 1, 'V' => 2, 'W' => 3, 'X' => 4, 'Y' => 5, 'Z' => 0)
array('0' => 1, '1' => 2, '2' => 3, '3' => 4, '4' => 5, '5' => 0, '6' => 1, '7' => 2, '8' => 3, '9' => 4, 'A' => 5, 'B' => 0, 'C' => 1, 'D' => 2, 'E' => 3, 'F' => 4, 'G' => 5, 'H' => 0, 'I' => 1, 'J' => 2, 'K' => 3, 'L' => 4, 'M' => 5, 'N' => 0, 'O' => 1, 'P' => 2, 'Q' => 3, 'R' => 4, 'S' => 5, 'T' => 0, 'U' => 1, 'V' => 2, 'W' => 3, 'X' => 4, 'Y' => 5, 'Z' => 0)
Details- Type
- n/a


boolean $_drawText = true
Display (or not) human readable text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_drawTexttrue
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_drawText


integer $_factor = 1
Factor to multiply bar and font measure (barHeight, barThinWidth, barThickWidth & fontSize)
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_factor1
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_factor


integer|string $_font = null
Font resource - integer (1 to 5): corresponds to GD included fonts - string: corresponds to path of a TTF font
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_fontnull
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
Font and bars color of the object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_foreColor0
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()
Set of drawing instructions
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_instructionsarray()
Details- Type
- array
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_instructions


\$_mandatoryChecksum $_mandatoryChecksum = false
Activation of mandatory checksum to deactivate unauthorized modification
<p>boolean</p>Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_mandatoryChecksumfalse
Details- Type
- \$_mandatoryChecksum
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_mandatoryChecksum


boolean $_mandatoryQuietZones = false
Force quiet zones even if
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_mandatoryQuietZonesfalse
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_mandatoryQuietZones


integer $_offsetLeft = null
Offset from the left the object (calculated from the orientation)
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_offsetLeftnull
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_offsetLeft


integer $_offsetTop = null
Offset from the top the object (calculated from the orientation)
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_offsetTopnull
Details- Type
- integer
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_offsetTop


float $_orientation = 0
Orientation of the barcode in degrees
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_orientation0
Details- Type
- float
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_orientation


$_rows = array('0' => 1, '1' => 1, '2' => 1, '3' => 1, '4' => 1, '5' => 1, '6' => 2, '7' => 2, '8' => 2, '9' => 2, 'A' => 2, 'B' => 2, 'C' => 3, 'D' => 3, 'E' => 3, 'F' => 3, 'G' => 3, 'H' => 3, 'I' => 4, 'J' => 4, 'K' => 4, 'L' => 4, 'M' => 4, 'N' => 4, 'O' => 5, 'P' => 5, 'Q' => 5, 'R' => 5, 'S' => 5, 'T' => 5, 'U' => 0, 'V' => 0, 'W' => 0, 'X' => 0, 'Y' => 0, 'Z' => 0)
array('0' => 1, '1' => 1, '2' => 1, '3' => 1, '4' => 1, '5' => 1, '6' => 2, '7' => 2, '8' => 2, '9' => 2, 'A' => 2, 'B' => 2, 'C' => 3, 'D' => 3, 'E' => 3, 'F' => 3, 'G' => 3, 'H' => 3, 'I' => 4, 'J' => 4, 'K' => 4, 'L' => 4, 'M' => 4, 'N' => 4, 'O' => 5, 'P' => 5, 'Q' => 5, 'R' => 5, 'S' => 5, 'T' => 5, 'U' => 0, 'V' => 0, 'W' => 0, 'X' => 0, 'Y' => 0, 'Z' => 0)
Details- Type
- n/a


string $_staticFont = null
TTF font name: can be set before instanciation of the object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_staticFontnull
Details- Type
- string
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_staticFont


boolean $_stretchText = false
Adjust (or not) position of human readable characters with barcode
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_stretchTextfalse
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_stretchText


\$_substituteChecksumCharacter $_substituteChecksumCharacter = 0
Character used to substitute checksum character for validation
<p>mixed</p>Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_substituteChecksumCharacter0
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
Activate/deactivate border of the object
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_withBorderfalse
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_withBorder


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


boolean $_withChecksumInText = false
Drawing of checksum inside text
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_withChecksumInTextfalse
Details- Type
- boolean
- Inherited_from
- \Zend_Barcode_Object_ObjectAbstract::$$_withChecksumInText


boolean $_withQuietZones = true
Activate/deactivate drawing of quiet zones
Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_withQuietZonestrue
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()Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


_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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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


_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()

_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
Inherited from: \Zend_Barcode_Object_ObjectAbstract::_validateText()Name | Type | Description |
---|---|---|
$value | string | |
$options | array |


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

draw() : array
Complete drawing of the barcode
Inherited from: \Zend_Barcode_Object_ObjectAbstract::draw()Type | Description |
---|---|
array | Table of instructions |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


setText(string $value) : \Zend_Barcode_Object
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 |
Exception | Description |
---|---|
\Zend_Barcode_Object_Exception |


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 |