本文整理汇总了PHP中Zend_Barcode_Object_ObjectAbstract类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Barcode_Object_ObjectAbstract类的具体用法?PHP Zend_Barcode_Object_ObjectAbstract怎么用?PHP Zend_Barcode_Object_ObjectAbstract使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Barcode_Object_ObjectAbstract类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testStaticFontAsNumber
public function testStaticFontAsNumber()
{
for ($i = 1; $i < 5; $i++) {
Zend_Barcode_Object_ObjectAbstract::setBarcodeFont($i);
$this->assertEquals('', $this->_object->getFont());
$object = $this->_getBarcodeObject();
$this->assertEquals($i, $object->getFont());
Zend_Barcode_Object_ObjectAbstract::setBarcodeFont('');
}
}
示例2: setBarcodeFont
/**
* Proxy for setBarcodeFont of Zend_Barcode_Object
* @param string $font
* @eturn void
*/
public static function setBarcodeFont($font)
{
// require_once 'Zend/Barcode/Object/ObjectAbstract.php';
Zend_Barcode_Object_ObjectAbstract::setBarcodeFont($font);
}
示例3: setBarcodeFont
/**
* Proxy for setBarcodeFont of Zend_Barcode_Object
* @param string $font
* @eturn void
*/
public static function setBarcodeFont($font)
{
require_once APPPATH . 'libraries/Zend/Barcode/Object/ObjectAbstract.php';
Zend_Barcode_Object_ObjectAbstract::setBarcodeFont($font);
}
示例4: setBarcodeFont
/**
* Proxy for setBarcodeFont of Zend_Barcode_Object
* @param string $font
* @eturn void
*/
public static function setBarcodeFont($font)
{
require_once PHP_LIBRARY_PATH . 'Zend/Barcode/Object/ObjectAbstract.php';
Zend_Barcode_Object_ObjectAbstract::setBarcodeFont($font);
}
示例5: _drawInstructionList
/**
* Sub process to draw the barcode instructions
* Needed by the automatic error rendering
*/
private function _drawInstructionList()
{
$instructionList = $this->_barcode->draw();
foreach ($instructionList as $instruction) {
switch ($instruction['type']) {
case 'polygon':
$this->_drawPolygon(
$instruction['points'],
$instruction['color'],
$instruction['filled']
);
break;
case 'text': //$text, $size, $position, $font, $color, $alignment = 'center', $orientation = 0)
$this->_drawText(
$instruction['text'],
$instruction['size'],
$instruction['position'],
$instruction['font'],
$instruction['color'],
$instruction['alignment'],
$instruction['orientation']
);
break;
default:
/**
* @see Zend_Barcode_Renderer_Exception
*/
require_once 'Zend/Barcode/Renderer/Exception.php';
throw new Zend_Barcode_Renderer_Exception(
'Unkown drawing command'
);
}
}
}
示例6: getTextToDisplay
/**
* Retrieve text to display
* @return string
*/
public function getTextToDisplay()
{
$text = parent::getTextToDisplay();
if (substr($text, 0, 1) != '*' && substr($text, -1) != '*') {
return '*' . $text . '*';
} else {
return $text;
}
}
示例7: _drawText
/**
* Partial function to draw text
* @return void
*/
protected function _drawText()
{
if (get_class($this) == 'Zend_Barcode_Object_Ean13') {
$this->_drawEan13Text();
} else {
parent::_drawText();
}
}
示例8: setBarcodeFont
/**
* Set the font for all instances of barcode
* @param string $font
* @return void
*/
public static function setBarcodeFont($font)
{
if (is_string($font) || is_int($font) && $font >= 1 && $font <= 5) {
self::$_staticFont = $font;
}
}