@@ 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->parseRelatedTopics($result, $json->RelatedTopics); |
|
48 | return $result; |
|
@@ 73-81 (lines=9) @@ | ||
70 | $topic = new RelatedTopic(); |
|
71 | $ref = new ReflectionClass($topic); |
|
72 | $methods = $ref->getMethods(ReflectionMethod::IS_PUBLIC); |
|
73 | foreach ($methods as $method) { |
|
74 | if (($propertyName = $this->getPropertyName($method))) { |
|
75 | if ($propertyName === 'Icon') { |
|
76 | $topic = $this->parseIcon($topic, $relatedTopic->Icon); |
|
77 | continue; |
|
78 | } |
|
79 | $this->assignPropertyValue($method, $topic, $relatedTopic, $propertyName); |
|
80 | } |
|
81 | } |
|
82 | $result->addRelatedTopic($topic); |
|
83 | } |
|
84 |