Skip to content

Commit 491dc75

Browse files
committed
add BaseService::setResult/getResult
1 parent 3db7d01 commit 491dc75

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/Services/BaseService.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ class BaseService extends StrictObject {
3535
public $error;
3636

3737

38+
/**
39+
* 处理结果
40+
* @var array
41+
*/
42+
public $result = [];
43+
44+
3845
/**
3946
* BaseService constructor.
4047
* @param array $vars
@@ -104,4 +111,22 @@ public function getErrorInfo(): array {
104111
}
105112

106113

114+
/**
115+
* 设置结果
116+
* @param array $arr
117+
* @return void
118+
*/
119+
public function setResult(array $arr): void {
120+
$this->result = $arr;
121+
}
122+
123+
124+
/**
125+
* 获取结果
126+
* @return array
127+
*/
128+
public function getResult(): array {
129+
return $this->result;
130+
}
131+
107132
}

0 commit comments

Comments
 (0)