feature#8022 Make the getNode function public (DomCrawler) (wesleyh)
This PR was merged into the master branch.
Discussion
----------
Make the getNode function public (DomCrawler)
The getNode function should be public so that DomElement objects can be accessed directly if need be without having to loop manually.
Use case: Want to get to the tagname of a specific domelement.
Commits
-------
9868415
Make getNode function public
This commit is contained in:
commit
f396ec11f2
@ -789,7 +789,7 @@ class Crawler extends \SplObjectStorage
|
||||
*
|
||||
* @return \DOMElement|null
|
||||
*/
|
||||
protected function getNode($position)
|
||||
public function getNode($position)
|
||||
{
|
||||
foreach ($this as $i => $node) {
|
||||
if ($i == $position) {
|
||||
|
Reference in New Issue
Block a user