src/voku/helper/SimpleHtmlDom.php 1 location
|
@@ 377-386 (lines=10) @@
|
| 374 |
|
* |
| 375 |
|
* @return SimpleHtmlDomInterface|SimpleHtmlDomInterface[]|SimpleHtmlDomNodeInterface|null |
| 376 |
|
*/ |
| 377 |
|
public function childNodes(int $idx = -1) |
| 378 |
|
{ |
| 379 |
|
$nodeList = $this->getIterator(); |
| 380 |
|
|
| 381 |
|
if ($idx === -1) { |
| 382 |
|
return $nodeList; |
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
return $nodeList[$idx] ?? null; |
| 386 |
|
} |
| 387 |
|
|
| 388 |
|
/** |
| 389 |
|
* Find nodes with a CSS selector. |
src/voku/helper/SimpleXmlDom.php 1 location
|
@@ 351-360 (lines=10) @@
|
| 348 |
|
* |
| 349 |
|
* @return SimpleXmlDomInterface|SimpleXmlDomInterface[]|SimpleXmlDomNodeInterface|null |
| 350 |
|
*/ |
| 351 |
|
public function childNodes(int $idx = -1) |
| 352 |
|
{ |
| 353 |
|
$nodeList = $this->getIterator(); |
| 354 |
|
|
| 355 |
|
if ($idx === -1) { |
| 356 |
|
return $nodeList; |
| 357 |
|
} |
| 358 |
|
|
| 359 |
|
return $nodeList[$idx] ?? null; |
| 360 |
|
} |
| 361 |
|
|
| 362 |
|
/** |
| 363 |
|
* Find nodes with a CSS selector. |