Interface for generate Barcode

category Zend
package Zend_Barcode
subpackage Object

 Methods

Constructor

__construct(array | \Traversable $options) 

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() : bool

Returns

bool

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(bool $recalculate) : integer

Parameters

$recalculate

bool

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(bool $recalculate) : float

Parameters

$recalculate

bool

Returns

float

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

getOffsetTop(bool $recalculate) : float

Parameters

$recalculate

bool

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() : bool

Returns

bool

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(bool $recalculate) : integer

Parameters

$recalculate

bool

Returns

integer

Retrieve if border are draw or not

getWithBorder() : bool

Returns

bool

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

getWithChecksum() : bool

Returns

bool

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

getWithChecksumInText() : bool

Returns

bool

Set the color of the background

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

Parameters

$value

integer

Returns

Set height of the barcode bar

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

Parameters

$value

integer

Returns

Set thickness of thick bar

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

Parameters

$value

integer

Returns

Set thickness of thin bar

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

Parameters

$value

integer

Returns

Set barcode namespace for autoloading

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

Parameters

$namespace

string

Returns

Activate/deactivate drawing of text to encode

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

Parameters

$value

bool

Returns

Set factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize

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

Parameters

$value

integer

Returns

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

Set the size of the font in case of TTF

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

Parameters

$value

float

Returns

Set color of the barcode and text

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

Parameters

$value

string

Returns

Set barcode state from options array

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

Parameters

$options

array

Returns

Set orientation of barcode and text

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

Parameters

$value

float

Returns

Allow fast inversion of font/bars color and background color

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

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

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

Parameters

$value

bool

Returns

Set text to encode

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

Parameters

$value

string

Returns

Activate/deactivate drawing of the bar

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

Parameters

$value

bool

Returns

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

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

Parameters

$value

bool

Returns

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

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

Parameters

$value

bool

Returns

Check for invalid characters

validateText(string $value) : void

Parameters

$value

string

Text to be checked