Interface ObjectInterface

Summary

Fully Qualified Name: Zend\Barcode\Object\ObjectInterface

Description

Interface for generate Barcode

Methods

Name Description Defined By
__construct() Constructor ObjectInterface
checkParams() Checking of parameters after all settings ObjectInterface
draw() Complete drawing of the barcode ObjectInterface
getBackgroundColor() Retrieve background color of the image ObjectInterface
getBarHeight() Get height of the barcode bar ObjectInterface
getBarThickWidth() Get thickness of thick bar ObjectInterface
getBarThinWidth() Get thickness of thin bar ObjectInterface
getBarcodeNamespace() Retrieve barcode namespace ObjectInterface
getDrawText() Retrieve if drawing of text to encode is enabled ObjectInterface
getFactor() Get factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize ObjectInterface
getFont() Retrieve the font ObjectInterface
getFontSize() Retrieve the size of the font in case of TTF ObjectInterface
getForeColor() Retrieve color of the barcode and text ObjectInterface
getHeight() Get height of the result object ObjectInterface
getInstructions() Retrieve the set of drawing instructions ObjectInterface
getOffsetLeft() Calculate the offset from the left of the object if an orientation is activated ObjectInterface
getOffsetTop() Calculate the offset from the top of the object if an orientation is activated ObjectInterface
getOrientation() Retrieve orientation of barcode and text ObjectInterface
getQuietZone() Quiet zone before first bar and after the last bar ObjectInterface
getRawText() Retrieve text to encode ObjectInterface
getStretchText() Retrieve if the adjustment of the position of the characters to the position of the bars is enabled ObjectInterface
getText() Retrieve text to encode ObjectInterface
getTextToDisplay() Retrieve text to display ObjectInterface
getType() Retrieve type of barcode ObjectInterface
getWidth() Get width of the result object ObjectInterface
getWithBorder() Retrieve if border are draw or not ObjectInterface
getWithChecksum() Retrieve if the checksum character is automatically added to the barcode text ObjectInterface
getWithChecksumInText() Retrieve if the checksum character is automatically added to the barcode text ObjectInterface
setBackgroundColor() Set the color of the background ObjectInterface
setBarHeight() Set height of the barcode bar ObjectInterface
setBarThickWidth() Set thickness of thick bar ObjectInterface
setBarThinWidth() Set thickness of thin bar ObjectInterface
setBarcodeNamespace() Set barcode namespace for autoloading ObjectInterface
setDrawText() Activate/deactivate drawing of text to encode ObjectInterface
setFactor() Set factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize ObjectInterface
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 ObjectInterface
setFontSize() Set the size of the font in case of TTF ObjectInterface
setForeColor() Set color of the barcode and text ObjectInterface
setOptions() Set barcode state from options array ObjectInterface
setOrientation() Set orientation of barcode and text ObjectInterface
setReverseColor() Allow fast inversion of font/bars color and background color ObjectInterface
setStretchText() Activate/deactivate the adjustment of the position of the characters to the position of the bars ObjectInterface
setText() Set text to encode ObjectInterface
setWithBorder() Activate/deactivate drawing of the bar ObjectInterface
setWithChecksum() Activate/deactivate the automatic generation of the checksum character added to the barcode text ObjectInterface
setWithChecksumInText() Activate/deactivate the automatic generation of the checksum character added to the barcode text ObjectInterface
validateText() Check for invalid characters ObjectInterface

Method Details

__construct()

Constructor

Parameter Name Type Description
$options array|\Traversable

Returns:

checkParams()

Checking of parameters after all settings

Returns: void

draw()

Complete drawing of the barcode

Returns: array Table of instructions

getBackgroundColor()

Retrieve background color of the image

Returns: int

getBarHeight()

Get height of the barcode bar

Returns: int

getBarThickWidth()

Get thickness of thick bar

Returns: int

getBarThinWidth()

Get thickness of thin bar

Returns: int

getBarcodeNamespace()

Retrieve barcode namespace

Returns: string

getDrawText()

Retrieve if drawing of text to encode is enabled

Returns: bool

getFactor()

Get factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize

Returns: int

getFont()

Retrieve the font

Returns: int|string

getFontSize()

Retrieve the size of the font in case of TTF

Returns: float

getForeColor()

Retrieve color of the barcode and text

Returns: int

getHeight()

Get height of the result object

Parameter Name Type Description
$recalculate bool

Returns: int

getInstructions()

Retrieve the set of drawing instructions

Returns: array

getOffsetLeft()

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

Parameter Name Type Description
$recalculate bool

Returns: float

getOffsetTop()

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

Parameter Name Type Description
$recalculate bool

Returns: float

getOrientation()

Retrieve orientation of barcode and text

Returns: float

getQuietZone()

Quiet zone before first bar and after the last bar

Returns: int

getRawText()

Retrieve text to encode

Returns: string

getStretchText()

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

Returns: bool

getText()

Retrieve text to encode

Returns: string

getTextToDisplay()

Retrieve text to display

Returns: string

getType()

Retrieve type of barcode

Returns: string

getWidth()

Get width of the result object

Parameter Name Type Description
$recalculate bool

Returns: int

getWithBorder()

Retrieve if border are draw or not

Returns: bool

getWithChecksum()

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

Returns: bool

getWithChecksumInText()

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

Returns: bool

setBackgroundColor()

Set the color of the background

Parameter Name Type Description
$value int

Returns: self Provides a fluent interface

setBarHeight()

Set height of the barcode bar

Parameter Name Type Description
$value int

Returns: self Provides a fluent interface

setBarThickWidth()

Set thickness of thick bar

Parameter Name Type Description
$value int

Returns: self Provides a fluent interface

setBarThinWidth()

Set thickness of thin bar

Parameter Name Type Description
$value int

Returns: self Provides a fluent interface

setBarcodeNamespace()

Set barcode namespace for autoloading

Parameter Name Type Description
$namespace string

Returns: self Provides a fluent interface

setDrawText()

Activate/deactivate drawing of text to encode

Parameter Name Type Description
$value bool

Returns: self Provides a fluent interface

setFactor()

Set factor applying to thinBarWidth - thickBarWidth - barHeight - fontSize

Parameter Name Type Description
$value int

Returns: self Provides a fluent interface

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

Parameter Name Type Description
$value int|string

Returns: self Provides a fluent interface

setFontSize()

Set the size of the font in case of TTF

Parameter Name Type Description
$value float

Returns: self Provides a fluent interface

setForeColor()

Set color of the barcode and text

Parameter Name Type Description
$value string

Returns: self Provides a fluent interface

setOptions()

Set barcode state from options array

Parameter Name Type Description
$options array

Returns: self Provides a fluent interface

setOrientation()

Set orientation of barcode and text

Parameter Name Type Description
$value float

Returns: self Provides a fluent interface

setReverseColor()

Allow fast inversion of font/bars color and background color

Returns: self Provides a fluent interface

setStretchText()

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

setText()

Set text to encode

Parameter Name Type Description
$value string

Returns: self Provides a fluent interface

setWithBorder()

Activate/deactivate drawing of the bar

Parameter Name Type Description
$value bool

Returns: self Provides a fluent interface

setWithChecksum()

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

setWithChecksumInText()

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

validateText()

Check for invalid characters

Parameter Name Type Description
$value string Text

Returns: void

Top