@@ 250-261 (lines=12) @@ | ||
247 | } |
|
248 | } |
|
249 | // Получаем привязки к Категориям |
|
250 | } elseif(\XMLReader::ELEMENT === $xml->nodeType && static::NODE_GRUPPY === $xml->name) { |
|
251 | $result['categories'] = []; |
|
252 | while ($xml->read()) { |
|
253 | if (\XMLReader::END_ELEMENT === $xml->nodeType && static::NODE_GRUPPY === $xml->name) { |
|
254 | break; |
|
255 | } elseif (\XMLReader::ELEMENT === $xml->nodeType && static::ELEMENT_ID === $xml->name) { |
|
256 | if (null !== $_value = $this->getElementText($xml->name)) { |
|
257 | $result['categories'][] = $_value; |
|
258 | } |
|
259 | } |
|
260 | } |
|
261 | } |
|
262 | } |
|
263 | ||
264 | return $result; |
|
@@ 333-345 (lines=13) @@ | ||
330 | if (null !== $_value = $this->getElementText($_name)) { |
|
331 | $result[$_name] = $_value; |
|
332 | } |
|
333 | } elseif (\XMLReader::ELEMENT === $xml->nodeType && static::ELEMENT_CENY === $xml->name) { |
|
334 | $result['price'] = []; |
|
335 | while ($xml->read()) { |
|
336 | if (\XMLReader::END_ELEMENT === $xml->nodeType && static::ELEMENT_CENY === $xml->name) { |
|
337 | break; |
|
338 | } elseif (\XMLReader::ELEMENT === $xml->nodeType && static::ELEMENT_CENA_ZA_EDENICU === $xml->name) { |
|
339 | $_name = $xml->name; |
|
340 | if (null !== $_value = $this->getElementText($_name)) { |
|
341 | $result['price'][] = $_value; |
|
342 | } |
|
343 | } |
|
344 | } |
|
345 | } |
|
346 | } |
|
347 | ||
348 | return $result; |