PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.20
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.20
1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 All 164 releases
woocommerce-pos / vendor_prefixed / picqer / php-barcode-generator / src / Barcode.php

Barcode.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.20, at vendor_prefixed/picqer/php-barcode-generator/src/Barcode.php

38 lines 777 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WCPOS\Vendor\Picqer\Barcode;
4
5 class Barcode
6 {
7 protected $barcode;
8 protected $width = 0;
9 protected $height = 0;
10 protected $bars = [];
11 public function __construct(string $barcode)
12 {
13 $this->barcode = $barcode;
14 }
15 public function addBar(BarcodeBar $bar)
16 {
17 $this->bars[] = $bar;
18 $this->width += $bar->getWidth();
19 $this->height = \max($this->height, $bar->getHeight());
20 }
21 public function getBarcode() : string
22 {
23 return $this->barcode;
24 }
25 public function getWidth() : int
26 {
27 return $this->width;
28 }
29 public function getHeight() : int
30 {
31 return $this->height;
32 }
33 public function getBars() : array
34 {
35 return $this->bars;
36 }
37 }
38