PHPHtmlParser\Dom\Collection::__call PHP Method

__call() public method

Attempts to call the method on the first node in the collection.
public __call ( string $method, array $arguments ) : mixed;
$method string
$arguments array
return mixed;
    public function __call($method, $arguments)
    {
        $node = reset($this->collection);
        if ($node instanceof AbstractNode) {
            return call_user_func_array([$node, $method], $arguments);
        } else {
            throw new EmptyCollectionException('The collection does not contain any Nodes.');
        }
    }