Interface for generate Barcode

package Default

 Methods

Constructor

__construct(array|\Traversable $options = null

Parameters

$options

array\Traversable

Checking of parameters after all settings

checkParams() : void

Complete drawing of the barcode

draw() : array

Returns

arrayTable of instructions

Retrieve background color of the image

getBackgroundColor() : integer

Returns

integer

Get height of the barcode bar

getBarHeight() : integer

Returns

integer

Get thickness of thick bar

getBarThickWidth() : integer

Returns

integer

Get thickness of thin bar

getBarThinWidth() : integer

Returns

integer

Retrieve barcode namespace

getBarcodeNamespace() : string

Returns

string

Retrieve if drawing of text to encode is enabled

getDrawText() : boolean

Returns

boolean

Get factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize

getFactor() : integer

Returns

integer

Retrieve the font

getFont() : integer | string

Returns

integerstring

Retrieve the size of the font in case of TTF

getFontSize() : float

Returns

float

Retrieve color of the barcode and text

getForeColor() : integer

Returns

integer

Get height of the result object

getHeight(boolean $recalculate = false) : integer

Parameters

$recalculate

boolean

Returns

integer

Retrieve the set of drawing instructions

getInstructions() : array

Returns

array

Calculate the offset from the left of the object if an orientation is activated

getOffsetLeft(boolean $recalculate = false) : float

Parameters

$recalculate

boolean

Returns

float

Calculate the offset from the top of the object if an orientation is activated

getOffsetTop(boolean $recalculate = false) : float

Parameters

$recalculate

boolean

Returns

float

Retrieve orientation of barcode and text

getOrientation() : float

Returns

float

Quiet zone before first bar and after the last bar

getQuietZone() : integer

Returns

integer

Retrieve text to encode

getRawText() : string

Returns

string

Retrieve if the adjustment of the position of the characters to the position of the bars is enabled

getStretchText() : boolean

Returns

boolean

Retrieve text to encode

getText() : string

Returns

string

Retrieve text to display

getTextToDisplay() : string

Returns

string

Retrieve type of barcode

getType() : string

Returns

string

Get width of the result object

getWidth(boolean $recalculate = false) : integer

Parameters

$recalculate

boolean

Returns

integer

Retrieve if border are draw or not

getWithBorder() : boolean

Returns

boolean

Retrieve if the checksum character is automatically added to the barcode text

getWithChecksum() : boolean

Returns

boolean

Retrieve if the checksum character is automatically added to the barcode text

getWithChecksumInText() : boolean

Returns

boolean

Set the color of the background

setBackgroundColor(integer $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

integer

Returns

\Zend\Barcode\Object\ObjectInterface

Set height of the barcode bar

setBarHeight(integer $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

integer

Returns

\Zend\Barcode\Object\ObjectInterface

Set thickness of thick bar

setBarThickWidth(integer $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

integer

Returns

\Zend\Barcode\Object\ObjectInterface

Set thickness of thin bar

setBarThinWidth(integer $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

integer

Returns

\Zend\Barcode\Object\ObjectInterface

Set barcode namespace for autoloading

setBarcodeNamespace(string $namespace) : \Zend\Barcode\Object\ObjectInterface

Parameters

$namespace

string

Returns

\Zend\Barcode\Object\ObjectInterface

Activate/deactivate drawing of text to encode

setDrawText(boolean $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

boolean

Returns

\Zend\Barcode\Object\ObjectInterface

Set factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize

setFactor(integer $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

integer

Returns

\Zend\Barcode\Object\ObjectInterface

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

setFont(integer|string $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

integerstring

Returns

\Zend\Barcode\Object\ObjectInterface

Set the size of the font in case of TTF

setFontSize(float $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

float

Returns

\Zend\Barcode\Object\ObjectInterface

Set color of the barcode and text

setForeColor(string $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

string

Returns

\Zend\Barcode\Object\ObjectInterface

Set barcode state from options array

setOptions(array $options) : \Zend\Barcode\Object\ObjectInterface

Parameters

$options

array

Returns

\Zend\Barcode\Object\ObjectInterface

Set orientation of barcode and text

setOrientation(float $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

float

Returns

\Zend\Barcode\Object\ObjectInterface

Allow fast inversion of font/bars color and background color

setReverseColor() : \Zend\Barcode\Object\ObjectInterface

Returns

\Zend\Barcode\Object\ObjectInterface

Activate/deactivate the adjustment of the position of the characters to the position of the bars

setStretchText(boolean $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

boolean

Returns

\Zend\Barcode\Object\ObjectInterface

Set text to encode

setText(string $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

string

Returns

\Zend\Barcode\Object\ObjectInterface

Activate/deactivate drawing of the bar

setWithBorder(boolean $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

boolean

Returns

\Zend\Barcode\Object\ObjectInterface

Activate/deactivate the automatic generation of the checksum character added to the barcode text

setWithChecksum(boolean $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

boolean

Returns

\Zend\Barcode\Object\ObjectInterface

Activate/deactivate the automatic generation of the checksum character added to the barcode text

setWithChecksumInText(boolean $value) : \Zend\Barcode\Object\ObjectInterface

Parameters

$value

boolean

Returns

\Zend\Barcode\Object\ObjectInterface

Check for invalid characters

validateText(string $value) : void

Parameters

$value

string

Text to be checked