@@ 97-109 (lines=13) @@ | ||
94 | /** |
|
95 | * @return array|bool |
|
96 | */ |
|
97 | public function parseResponseToEntities() |
|
98 | { |
|
99 | if (!$this->checkResponse()) { |
|
100 | return false; |
|
101 | } |
|
102 | $this->entities = []; |
|
103 | ||
104 | foreach ($this->response['data'] as $item) { |
|
105 | $this->entities[] = $this->parseArrayToEntity($item); |
|
106 | } |
|
107 | ||
108 | return $this->entities; |
|
109 | } |
|
110 | ||
111 | /** |
|
112 | * @return bool |
@@ 101-113 (lines=13) @@ | ||
98 | /** |
|
99 | * @return array|bool |
|
100 | */ |
|
101 | public function parseResponseToEntities() |
|
102 | { |
|
103 | if (!$this->checkResponse()) { |
|
104 | return false; |
|
105 | } |
|
106 | $this->entities = []; |
|
107 | ||
108 | foreach ($this->response['_embedded']['items'] as $item) { |
|
109 | $this->entities[] = $this->parseArrayToEntity($item); |
|
110 | } |
|
111 | ||
112 | return $this->entities; |
|
113 | } |
|
114 | ||
115 | /** |
|
116 | * @param $array |