PHPHtmlParser\Dom\Collection::__toString PHP Method

__toString() public method

Applies the magic string method to the first node in the collection.
public __toString ( ) : string
return string
    public function __toString()
    {
        $node = reset($this->collection);
        if ($node instanceof AbstractNode) {
            return (string) $node;
        } else {
            throw new EmptyCollectionException('The collection does not contain any Nodes.');
        }
    }