-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
$returnFullResponse should behave as it say, which is return full response
but looking at the codes here :
osrs-toolkit-php/opensrs/domains/lookup/AllInOneDomain.php
Lines 40 to 56 in b74c297
| public function customResponseHandling($arrayResult, $returnFullResponse = true) | |
| { | |
| if ($returnFullResponse) { | |
| if (isset($arrayResult['attributes']['premium']['items'])) { | |
| $tempHold = $arrayResult['attributes']['premium']['items']; | |
| } else { | |
| $tempHold = null; | |
| } | |
| $arrayResult = array( | |
| 'lookup' => $arrayResult['attributes']['lookup']['items'], | |
| 'premium' => $tempHold, | |
| 'suggestion' => $arrayResult['attributes']['suggestion']['items'], | |
| ); | |
| } | |
| return $arrayResult; |
$returnFullResponse = true, it instead "limiting" the response, not returning full response.
Compare with other code, e.g.
osrs-toolkit-php/opensrs/domains/lookup/NameSuggest.php
Lines 40 to 58 in b74c297
| public function customResponseHandling($arrayResult, $returnFullResponse = true) | |
| { | |
| if (!$returnFullResponse) { | |
| if (isset($arrayResult['attributes'])) { | |
| $resultRaw = array(); | |
| if (isset($arrayResult['attributes']['lookup']['items'])) { | |
| $resultRaw['lookup'] = $arrayResult['attributes']['lookup']['items']; | |
| } | |
| if (isset($arrayResult['attributes']['suggestion']['items'])) { | |
| $resultRaw['suggestion'] = $arrayResult['attributes']['suggestion']['items']; | |
| } | |
| $arrayResult = $resultRaw; | |
| } | |
| } | |
| return $arrayResult; |
Metadata
Metadata
Assignees
Labels
No labels