Skip to content

Commit f99e2bf

Browse files
author
houchaowen
committed
Add secretKey support for registry
1 parent 8ab6d02 commit f99e2bf

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Register.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@
33

44
class Register extends \GatewayWorker\Register
55
{
6-
public function __construct()
6+
public function __construct($config)
77
{
8-
8+
$propertyMap = [
9+
'secretKey',
10+
// 'reloadable',
11+
// 'user',
12+
// 'group',
13+
];
14+
foreach ($propertyMap as $property) {
15+
if (isset($config[$property])) {
16+
$this->$property = $config[$property];
17+
}
18+
}
919
}
1020

1121
public function onWorkerstart()

0 commit comments

Comments
 (0)