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