public function Crawler::text in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dom-crawler/Crawler.php \Symfony\Component\DomCrawler\Crawler::text()
Returns the node value of the first node of the list.
Return value
string The node value
Throws
\InvalidArgumentException When current node is empty
File
- vendor/
symfony/ dom-crawler/ Crawler.php, line 551
Class
- Crawler
- Crawler eases navigation of a list of \DOMElement objects.
Namespace
Symfony\Component\DomCrawlerCode
public function text() {
if (!count($this)) {
throw new \InvalidArgumentException('The current node list is empty.');
}
return $this
->getNode(0)->nodeValue;
}