Zend Framework  3.0
Protected Member Functions | Protected Attributes | List of all members
Ean2 Class Reference

Class for generate Ean2 barcode. More...

Protected Member Functions

 getDefaultOptions ()
 Default options for Ean2 barcode.
 
 getParity ($i)
 
- Protected Member Functions inherited from Ean5
 getDefaultOptions ()
 Default options for Ean5 barcode.
 
 calculateBarcodeWidth ()
 Width of the barcode (in pixels)
 
 prepareBarcode ()
 Prepare array to draw barcode.
 
 getParity ($i)
 
- Protected Member Functions inherited from Ean13
 getDefaultOptions ()
 Default options for Postnet barcode.
 
 calculateBarcodeWidth ()
 Width of the barcode (in pixels)
 
 checkSpecificParams ()
 Partial check of interleaved EAN/UPC barcode.
 
 prepareBarcode ()
 Prepare array to draw barcode.
 
 drawText ()
 Partial function to draw text.
 
 drawEan13Text ()
 
- Protected Member Functions inherited from AbstractObject
 getDefaultOptions ()
 Set default options for particular object.
 
 addLeadingZeros ($text, $withoutChecksum=false)
 Automatically add leading zeros if barcode length is fixed.
 
 addInstruction (array $instruction)
 Add an instruction in the array of instructions.
 
 addPolygon (array $points, $color=null, $filled=true)
 Add a polygon drawing instruction in the set of instructions.
 
 addText ($text, $size, $position, $font, $color, $alignment= 'center', $orientation=0)
 Add a text drawing instruction in the set of instructions.
 
 checkText ($value=null)
 Check if a text is really provided to barcode.
 
 checkRatio ($min=2, $max=3)
 Check the ratio between the thick and the thin bar.
 
 checkFontAndOrientation ()
 Drawing with an angle is just allow TTF font.
 
 calculateWidth ()
 Width of the result image (before any rotation)
 
 calculateBarcodeWidth ()
 Calculate the width of the barcode.
 
 calculateHeight ()
 Height of the result object.
 
 calculateBarcodeHeight ()
 Height of the barcode.
 
 rotate ($x1, $y1)
 Apply rotation on a point in X/Y dimensions.
 
 drawBarcode ()
 Draw the barcode.
 
 drawBorder ()
 Partial function to draw border.
 
 drawText ()
 Partial function to draw text.
 
 validateSpecificText ($value, $options=[])
 Standard validation for most of barcode objects.
 
 prepareBarcode ()
 Each child must prepare the barcode and return a table like array( 0 => array( 0 => int (visible(black) or not(white)) 1 => int (width of the bar) 2 => float (0->1 position from the top of the beginning of the bar in %) 3 => float (0->1 position from the top of the end of the bar in %) ), 1 => ...
 
 checkSpecificParams ()
 Checking of parameters after all settings.
 
 preDrawBarcode ()
 Allow each child to draw something else.
 
 postDrawBarcode ()
 Allow each child to draw something else (ex: bearer bars in interleaved 2 of 5 code)
 

Protected Attributes

 $parities
 
- Protected Attributes inherited from Ean5
 $parities
 
- Protected Attributes inherited from Ean13
 $codingMap
 
 $parities
 
- Protected Attributes inherited from AbstractObject
 $barcodeNamespace = 'Zend\Barcode\Object'
 
 $instructions = []
 
 $type = null
 
 $height = null
 
 $width = null
 
 $barHeight = 50
 
 $barThinWidth = 1
 
 $barThickWidth = 3
 
 $factor = 1
 
 $foreColor = 0x000000
 
 $backgroundColor = 0xFFFFFF
 
 $withBorder = false
 
 $withQuietZones = true
 
 $mandatoryQuietZones = false
 
 $orientation = 0
 
 $offsetTop = null
 
 $offsetLeft = null
 
 $text = null
 
 $drawText = true
 
 $stretchText = false
 
 $font = null
 
 $fontSize = 10
 
 $withChecksum = false
 
 $withChecksumInText = false
 
 $barcodeLength = null
 
 $addLeadingZeros = true
 
 $mandatoryChecksum = false
 
 $substituteChecksumCharacter = 0
 

Additional Inherited Members

- Public Member Functions inherited from Ean5
 getChecksum ($text)
 Get barcode checksum.
 
 getText ()
 Retrieve text to encode.
 

Detailed Description

Class for generate Ean2 barcode.

Member Function Documentation

getDefaultOptions ( )
protected

Default options for Ean2 barcode.

Returns
void
getParity (   $i)
protected

Member Data Documentation

$parities
protected
Initial value:
= [
0 => ['A','A']