/**
  * @test
  * @depends validationTest
  */
 public function fieldsTest()
 {
     $bc = new Ean13('750103131130', false);
     $this->assertEquals($bc->getSystemCode(), '750');
     $this->assertEquals($bc->getManufacturerCode(), '1031');
     $this->assertEquals($bc->getProductCode(), '31130');
     $bc = new Ean13('990010313113', false);
     $this->assertEquals($bc->getSystemCode(), '99');
     $this->assertEquals($bc->getManufacturerCode(), '00103');
     $this->assertEquals($bc->getProductCode(), '13113');
 }
Exemple #2
0
 /**
  * 
  * @param EncoderInterface $encoder
  * @param string $data
  */
 protected function encodeData(EncoderInterface &$encoder, $data)
 {
     $encoder = $this->ean13->getEncoded();
 }
Exemple #3
0
 /**
  * Draw the ISBN text on barcode.
  * 
  * @param RendererInterface $renderer
  */
 protected function drawText(RendererInterface &$renderer)
 {
     $textHeight = $this->getTextHeight();
     $this->options['barheight'] += $textHeight;
     parent::drawText($renderer);
     $renderer->drawText([$this->getTextX(), $this->getContentOffsetTop() + 1], 'ISBN ' . $this->getISBN(true), $this->options['forecolor'], $this->options['font'], $this->options['fontsize'], 'center');
     $this->options['barheight'] -= $textHeight;
 }