| 1 |
<?php |
| 2 |
|
| 3 |
namespace WCPOS\Vendor\Picqer\Barcode; |
| 4 |
|
| 5 |
class BarcodeBar |
| 6 |
{ |
| 7 |
protected $width; |
| 8 |
protected $height; |
| 9 |
protected $positionVertical; |
| 10 |
protected $type; |
| 11 |
const TYPE_BAR = 1; |
| 12 |
const TYPE_SPACING = 0; |
| 13 |
public function __construct(int $width, int $height, bool $drawBar = \true, int $positionVertical = 0) |
| 14 |
{ |
| 15 |
$this->width = $width; |
| 16 |
$this->height = $height; |
| 17 |
$this->positionVertical = $positionVertical; |
| 18 |
$this->type = $drawBar ? self::TYPE_BAR : self::TYPE_SPACING; |
| 19 |
} |
| 20 |
public function getWidth() : int |
| 21 |
{ |
| 22 |
return $this->width; |
| 23 |
} |
| 24 |
public function getHeight() : int |
| 25 |
{ |
| 26 |
return $this->height; |
| 27 |
} |
| 28 |
public function getPositionVertical() : int |
| 29 |
{ |
| 30 |
return $this->positionVertical; |
| 31 |
} |
| 32 |
public function isBar() : bool |
| 33 |
{ |
| 34 |
return $this->type === self::TYPE_BAR; |
| 35 |
} |
| 36 |
} |
| 37 |
|