src/voku/helper/SimpleHtmlDom.php 1 location
|
@@ 401-410 (lines=10) @@
|
| 398 |
|
* |
| 399 |
|
* @return SimpleHtmlDomInterface|SimpleHtmlDomInterface[]|SimpleHtmlDomNodeInterface|null |
| 400 |
|
*/ |
| 401 |
|
public function childNodes(int $idx = -1) |
| 402 |
|
{ |
| 403 |
|
$nodeList = $this->getIterator(); |
| 404 |
|
|
| 405 |
|
if ($idx === -1) { |
| 406 |
|
return $nodeList; |
| 407 |
|
} |
| 408 |
|
|
| 409 |
|
return $nodeList[$idx] ?? null; |
| 410 |
|
} |
| 411 |
|
|
| 412 |
|
/** |
| 413 |
|
* Find nodes with a CSS selector. |
src/voku/helper/SimpleXmlDom.php 1 location
|
@@ 370-379 (lines=10) @@
|
| 367 |
|
* |
| 368 |
|
* @return SimpleXmlDomInterface|SimpleXmlDomInterface[]|SimpleXmlDomNodeInterface<SimpleXmlDomInterface>|null |
| 369 |
|
*/ |
| 370 |
|
public function childNodes(int $idx = -1) |
| 371 |
|
{ |
| 372 |
|
$nodeList = $this->getIterator(); |
| 373 |
|
|
| 374 |
|
if ($idx === -1) { |
| 375 |
|
return $nodeList; |
| 376 |
|
} |
| 377 |
|
|
| 378 |
|
return $nodeList[$idx] ?? null; |
| 379 |
|
} |
| 380 |
|
|
| 381 |
|
/** |
| 382 |
|
* Find nodes with a CSS selector. |