@@ 92-101 (lines=10) @@ | ||
89 | } |
|
90 | } |
|
91 | ||
92 | protected function indexRow($offset, $row) |
|
93 | { |
|
94 | $id = null; |
|
95 | if ($row instanceof Resource) { |
|
96 | $id = $row->getId(); |
|
97 | } elseif (is_array($row)) { |
|
98 | $id = isset($row[static::ID]) ? $row[static::ID] : null; |
|
99 | } |
|
100 | $this->addToIndex(static::ID, $offset, $id); |
|
101 | } |
|
102 | ||
103 | /** |
|
104 | * @param $id |
@@ 19-28 (lines=10) @@ | ||
16 | { |
|
17 | protected $type = '\Commercetools\Core\Model\Common\Price'; |
|
18 | ||
19 | protected function indexRow($offset, $row) |
|
20 | { |
|
21 | $id = null; |
|
22 | if ($row instanceof Price) { |
|
23 | $id = $row->getId(); |
|
24 | } elseif (is_array($row)) { |
|
25 | $id = isset($row[static::ID]) ? $row[static::ID] : null; |
|
26 | } |
|
27 | $this->addToIndex(static::ID, $offset, $id); |
|
28 | } |
|
29 | } |
|
30 |