You are here

public function Crawler::nodeName in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dom-crawler/Crawler.php \Symfony\Component\DomCrawler\Crawler::nodeName()

Returns the node name of the first node of the list.

Return value

string The node name

Throws

\InvalidArgumentException When current node is empty

File

vendor/symfony/dom-crawler/Crawler.php, line 535

Class

Crawler
Crawler eases navigation of a list of \DOMElement objects.

Namespace

Symfony\Component\DomCrawler

Code

public function nodeName() {
  if (!count($this)) {
    throw new \InvalidArgumentException('The current node list is empty.');
  }
  return $this
    ->getNode(0)->nodeName;
}