src/voku/helper/SimpleHtmlDom.php 1 location
|
@@ 389-398 (lines=10) @@
|
386 |
|
* |
387 |
|
* @return SimpleHtmlDomInterface|SimpleHtmlDomInterface[]|SimpleHtmlDomNodeInterface|null |
388 |
|
*/ |
389 |
|
public function childNodes(int $idx = -1) |
390 |
|
{ |
391 |
|
$nodeList = $this->getIterator(); |
392 |
|
|
393 |
|
if ($idx === -1) { |
394 |
|
return $nodeList; |
395 |
|
} |
396 |
|
|
397 |
|
return $nodeList[$idx] ?? null; |
398 |
|
} |
399 |
|
|
400 |
|
/** |
401 |
|
* Find nodes with a CSS selector. |
src/voku/helper/SimpleXmlDom.php 1 location
|
@@ 363-372 (lines=10) @@
|
360 |
|
* |
361 |
|
* @return SimpleXmlDomInterface|SimpleXmlDomInterface[]|SimpleXmlDomNodeInterface|null |
362 |
|
*/ |
363 |
|
public function childNodes(int $idx = -1) |
364 |
|
{ |
365 |
|
$nodeList = $this->getIterator(); |
366 |
|
|
367 |
|
if ($idx === -1) { |
368 |
|
return $nodeList; |
369 |
|
} |
370 |
|
|
371 |
|
return $nodeList[$idx] ?? null; |
372 |
|
} |
373 |
|
|
374 |
|
/** |
375 |
|
* Find nodes with a CSS selector. |