1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| <?php
|
| namespace app\common\library\printer\engine;
|
| /**
| * 小票打印机驱动基类
| */
| abstract class Basics
| {
| protected $config; // 打印机配置
| protected $times; // 打印联数(次数)
| protected $error; // 错误信息
|
| /**
| * 构造函数
| */
| public function __construct($config, $times)
| {
| $this->config = $config;
| $this->times = $times;
| }
|
| /**
| * 执行打印请求
| */
| abstract protected function printTicket($content);
|
| /**
| * 返回错误信息
| */
| public function getError()
| {
| return $this->error;
| }
|
| }
|
|