PHPHtmlParser\Dom\Collection::__get PHP Method

__get() public method

Attempts to apply the magic get to the first node in the collection.
public __get ( mixed $key ) : mixed
$key mixed
return mixed
    public function __get($key)
    {
        $node = reset($this->collection);
        if ($node instanceof AbstractNode) {
            return $node->{$key};
        } else {
            throw new EmptyCollectionException('The collection does not contain any Nodes.');
        }
    }