|
@@ 37-45 (lines=9) @@
|
| 34 |
|
|
| 35 |
|
$ref = new ReflectionClass($result); |
| 36 |
|
$methods = $ref->getMethods(ReflectionMethod::IS_PUBLIC); |
| 37 |
|
foreach ($methods as $method) { |
| 38 |
|
if (($propertyName = $this->getPropertyName($method))) { |
| 39 |
|
if ($propertyName === 'Meta') { |
| 40 |
|
$result = $this->parseMeta($result, $json->meta); |
| 41 |
|
continue; |
| 42 |
|
} |
| 43 |
|
$this->assignPropertyValue($method, $result, $json, $propertyName); |
| 44 |
|
} |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
$result = $this->parseResults($result, $json->RelatedTopics, false); |
| 48 |
|
$result = $this->parseResults($result, $json->Results, true); |
|
@@ 75-83 (lines=9) @@
|
| 72 |
|
$res = new Result(); |
| 73 |
|
$ref = new ReflectionClass($res); |
| 74 |
|
$methods = $ref->getMethods(ReflectionMethod::IS_PUBLIC); |
| 75 |
|
foreach ($methods as $method) { |
| 76 |
|
if (($propertyName = $this->getPropertyName($method))) { |
| 77 |
|
if ($propertyName === 'Icon') { |
| 78 |
|
$res = $this->parseIcon($res, $result->Icon); |
| 79 |
|
continue; |
| 80 |
|
} |
| 81 |
|
$this->assignPropertyValue($method, $res, $result, $propertyName); |
| 82 |
|
} |
| 83 |
|
} |
| 84 |
|
if( $isResult ) { |
| 85 |
|
$queryResult->addResult($res); |
| 86 |
|
} |