Barcode/Object/Leitcode.php

Show: inherited
Table of Contents

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: Leitcode.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Barcode_Object_Leitcode

Package: Zend\Barcode

Class for generate Identcode barcode

Parent(s)
\Zend_Barcode_Object_Identcode < \Zend_Barcode_Object_Code25interleaved < \Zend_Barcode_Object_Code25 < \Zend_Barcode_Object_ObjectAbstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\$_addLeadingZeros $_addLeadingZeros = true
Propertyprotectedarray $_codingMap = array('0' => '00110', '1' => '10001', '2' => '01001', '3' => '11000', '4' => '00101', '5' => '10100', '6' => '01100', '7' => '00011', '8' => '10010', '9' => '01010')
Default valuearray('0' => '00110', '1' => '10001', '2' => '01001', '3' => '11000', '4' => '00101', '5' => '10100', '6' => '01100', '7' => '00011', '8' => '10010', '9' => '01010')Details
Type
array
Inherited_from
\Zend_Barcode_Object_Code25::$$_codingMap  
Inherited_from
\Zend_Barcode_Object_Code25interleaved::$$_codingMap  
Inherited_from
\Zend_Barcode_Object_Identcode::$$_codingMap  
Propertyprotectedinteger $_factor = 1
inherited

Factor to multiply bar and font measure (barHeight, barThinWidth, barThickWidth & fontSize)

Inherited from: \Zend_Barcode_Object_ObjectAbstract::$$_factor\Zend_Barcode_Object_Code25::$$_factor\Zend_Barcode_Object_Code25interleaved::$$_factor\Zend_Barcode_Object_Identcode::$$_factor
Propertyprotectedinteger|string $_font = null
inherited

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::$$_font\Zend_Barcode_Object_Code25::$$_font\Zend_Barcode_Object_Code25interleaved::$$_font\Zend_Barcode_Object_Identcode::$$_font
Default valuenullDetails
Type
integer | string
Inherited_from
\Zend_Barcode_Object_ObjectAbstract::$$_font  
Inherited_from
\Zend_Barcode_Object_Code25::$$_font  
Inherited_from
\Zend_Barcode_Object_Code25interleaved::$$_font  
Inherited_from
\Zend_Barcode_Object_Identcode::$$_font  
Propertyprotected\$_mandatoryChecksum $_mandatoryChecksum = false
Propertyprivateboolean $_withBearerBars = false
Default valuefalseDetails
Type
boolean
Inherited_from
\Zend_Barcode_Object_Code25interleaved::$$_withBearerBars  
Inherited_from
\Zend_Barcode_Object_Identcode::$$_withBearerBars  

Methods

methodprotected_addInstruction(array $instruction) : void
Parameters
Name Type Description
$instruction array
methodprotected_addLeadingZeros(string $text, boolean $withoutChecksum = false) : void
Parameters
Name Type Description
$text string
$withoutChecksum boolean
methodprotected_addPolygon(array $points, integer $color = null, boolean $filled = true) : void
Parameters
Name Type Description
$points array
$color integer
$filled boolean
methodprotected_addText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float $orientation = 0) : void
Parameters
Name Type Description
$text string
$size float
$position array
$font string
$color integer
$alignment string
$orientation float
methodprotected_calculateBarcodeWidth() : integer
Returns
Type Description
integer
methodprotected_checkRatio(integer $min = 2, integer $max = 3) : void
Parameters
Name Type Description
$min integer
$max integer
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodprotected_checkText( $value = null) : void
Parameters
Name Type Description
$value
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodprotected_getDefaultOptions() : void

Default options for Leitcode barcode

methodprotected_postDrawBarcode() : void
methodprotected_prepareBarcode() : array

.. )

Returns
Type Description
array
methodprotected_rotate(float $x1, float $y1) : array
Parameters
Name Type Description
$x1 float

x-position before rotation

$y1 float

y-position before rotation

Returns
Type Description
array Array of two elements corresponding to the new XY point
methodprotected_validateText(string $value, array $options = array()) : void
Parameters
Name Type Description
$value string
$options array
methodpublicdraw() : array
Returns
Type Description
array Table of instructions
methodpublicgetChecksum(string $text) : int
inherited

Get barcode checksum

Inherited from: \Zend_Barcode_Object_Identcode::getChecksum()
Parameters
Name Type Description
$text string
Returns
Type Description
int
methodpublicgetDrawText() : boolean
Returns
Type Description
boolean
methodpublicgetFactor() : integer
Returns
Type Description
integer
methodpublicgetFont() : integer | string
Returns
Type Description
integer | string
methodpublicgetHeight( $recalculate = false) : integer
Parameters
Name Type Description
$recalculate
Returns
Type Description
integer
methodpublicgetOffsetLeft(boolean $recalculate = false) : float
Parameters
Name Type Description
$recalculate boolean
Returns
Type Description
float
methodpublicgetOffsetTop(boolean $recalculate = false) : float
Parameters
Name Type Description
$recalculate boolean
Returns
Type Description
float
methodpublicgetQuietZone() : integer
Returns
Type Description
integer
methodpublicgetStretchText() : boolean
Returns
Type Description
boolean
methodpublicgetTextToDisplay() : string

Retrieve text to display

Returns
Type Description
string
methodpublicgetWidth( $recalculate = false) : integer
Parameters
Name Type Description
$recalculate
Returns
Type Description
integer
methodpublicgetWithBearerBars() : boolean
Returns
Type Description
boolean
methodpublicgetWithChecksum() : boolean
Returns
Type Description
boolean
methodpublicgetWithChecksumInText() : boolean
Returns
Type Description
boolean
methodpublicsetBackgroundColor(integer $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value integer
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetBarHeight(integer $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value integer
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetBarThickWidth(integer $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value integer
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetBarThinWidth(integer $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value integer
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetBarcodeFont(string $font) : void
Parameters
Name Type Description
$font string
methodpublicsetBarcodeNamespace(string $namespace) : \Zend_Barcode_Object
Parameters
Name Type Description
$namespace string
Returns
Type Description
\Zend_Barcode_Object
methodpublicsetConfig(\Zend_Config $config) : \Zend_Barcode_Object
Parameters
Name Type Description
$config \Zend_Config
Returns
Type Description
\Zend_Barcode_Object
methodpublicsetDrawText(boolean $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value boolean
Returns
Type Description
\Zend_Barcode_Object
methodpublicsetFactor(float $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value float
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetFont(integer | string $value) : \Zend_Barcode_Object
inherited

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()\Zend_Barcode_Object_Code25::setFont()\Zend_Barcode_Object_Code25interleaved::setFont()\Zend_Barcode_Object_Identcode::setFont()
Parameters
Name Type Description
$value integer | string
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetFontSize(float $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value float
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetForeColor(string $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetOptions(array $options) : \Zend_Barcode_Object
Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Barcode_Object
methodpublicsetOrientation(float $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value float
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetReverseColor() : \Zend_Barcode_Object
Returns
Type Description
\Zend_Barcode_Object
methodpublicsetStretchText(boolean $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value boolean
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetText(string $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Barcode_Object
methodpublicsetWithBearerBars(boolean $value) : \Zend_Barcode_Object_Int25
Parameters
Name Type Description
$value boolean
Returns
Type Description
\Zend_Barcode_Object_Int25
methodpublicsetWithBorder(boolean $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value boolean
Returns
Type Description
\Zend_Barcode_Object
methodpublicsetWithChecksum(boolean $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value boolean
Returns
Type Description
\Zend_Barcode_Object
methodpublicsetWithChecksumInText(boolean $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value boolean
Returns
Type Description
\Zend_Barcode_Object
Throws
Exception Description
\Zend_Barcode_Object_Exception
methodpublicsetWithQuietZones(boolean $value) : \Zend_Barcode_Object
Parameters
Name Type Description
$value boolean
Returns
Type Description
\Zend_Barcode_Object
methodpublicvalidateText(string $value) : string
inherited

Check allowed characters

Inherited from: \Zend_Barcode_Object_Identcode::validateText()
Parameters
Name Type Description
$value string
Returns
Type Description
string
Throws
Exception Description
\Zend_Barcode_Object_Exception
Documentation was generated by phpDocumentor 2.0.0a8.