Total Complexity | 2 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | abstract class Gateway implements GatewayInterface |
||
11 | { |
||
12 | /** |
||
13 | * 配置参数 |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $config; |
||
17 | |||
18 | /** |
||
19 | * 是否开启debug |
||
20 | * @var bool |
||
21 | */ |
||
22 | protected $debug = false; |
||
23 | |||
24 | /** |
||
25 | * Gateway constructor. |
||
26 | * @param null $config |
||
|
|||
27 | * @throws \Exception |
||
28 | */ |
||
29 | public function __construct($config = []) |
||
30 | { |
||
31 | //默认参数 |
||
32 | $_config = [ |
||
33 | 'debug'=>false |
||
34 | ]; |
||
35 | $this->config = $config; |
||
36 | // $this->config = array_replace_recursive($_config,$config); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Function Name: 开启debug |
||
41 | * @param boolean $debug |
||
42 | * @author Tinymeng <[email protected]> |
||
43 | * @date: 2019/9/26 10:44 |
||
44 | */ |
||
45 | public function setDebug($debug){ |
||
47 | } |
||
48 | |||
50 |