@@ 29-32 (lines=4) @@ | ||
26 | $hydrated = false; |
|
27 | $entity = is_object($entity) ? $entity : new $entity; |
|
28 | ||
29 | if (isset($data['attributes']) && is_array($data['attributes'])) { |
|
30 | $entity = $this->hydrateAttributes($entity, $data['attributes'], $scope); |
|
31 | $hydrated = true; |
|
32 | } |
|
33 | ||
34 | ||
35 | if (isset($data['relationships']) && is_array($data['relationships'])) { |
|
@@ 35-38 (lines=4) @@ | ||
32 | } |
|
33 | ||
34 | ||
35 | if (isset($data['relationships']) && is_array($data['relationships'])) { |
|
36 | $entity = $this->hydrateRelationships($entity, $data['relationships'], $scope); |
|
37 | $hydrated = true; |
|
38 | } |
|
39 | ||
40 | if (!$hydrated) { |
|
41 | throw RestException::missingDataMembers($scope); |