Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
51 | * 获取结果 |
||
52 | * |
||
53 | * @param string $key 如果有此参数,表示取某个属性 |
||
54 | * |
||
55 | * @return mixed |
||
56 | */ |
||
57 | public function getResult($key = null) |
||
58 | { |
||
59 | if ($this->isSuccess()) { |
||
60 | if (null === $key) { |
||
61 | return $this->_result; |
||
62 | } else { |
||
63 | return I::get($this->_result, $key); |
||
64 | } |
||
65 | } |
||
66 | $error = $this->getError(); |
||
67 | if (is_array($error)) { |
||
122 |