Source of file Error.php
Size: 1,688 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Barcode/Object/Error.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 | <?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Barcode\Object; /** * Class for generate Barcode */ class Error extends AbstractObject { /** * All texts are accepted * @param string $value * @return bool */ public function validateText($value) { return true; } /** * Height is forced * @param bool $recalculate * @return int */ public function getHeight($recalculate = false) { return 40; } /** * Width is forced * @param bool $recalculate * @return int */ public function getWidth($recalculate = false) { return 400; } /** * Reset precedent instructions * and draw the error message * @return array */ public function draw() { $this->instructions = array(); $this->addText('ERROR:', 10, array(5, 18), $this->font, 0, 'left'); $this->addText($this->text, 10, array(5, 32), $this->font, 0, 'left'); return $this->instructions; } /** * For compatibility reason * @return void */ protected function prepareBarcode() { } /** * For compatibility reason * @return void */ protected function checkSpecificParams() { } /** * For compatibility reason * @return void */ protected function calculateBarcodeWidth() { } } |