Crawler.php
public function links()
    {
        $links = array();
        foreach ($this->nodes as $node) {
            if (!$node instanceof \DOMElement) {
                throw new \InvalidArgumentException(sprintf('The current node list should contain only DOMElement instances, "%s" found.', get_class($node)));
            }

            $links[] = new Link($node, $this->baseHref, 'get');
        }

        return $links;
    }
public function links()
    {
        $links = array();
        foreach ($this->nodes as $node) {
            if (!$node instanceof \DOMElement) {
                throw new \InvalidArgumentException(sprintf('The current node list should contain only DOMElement instances, "%s" found.', get_class($node)));
            }

            $links[] = new Link($node, $this->baseHref, 'get');
        }

        return $links;
    }
public function links ( ) { $ links = array ( ) ; foreach ( $ this -> nodes as $ node ) { if ( ! $ node instanceof \ DOMElement ) { throw new \ InvalidArgumentException ( sprintf ( 'The current node list should contain only DOMElement instances, "%s" found.' , get_class ( $ node ) ) ) ; } $ links [ ] = new Link ( $ node , $ this -> baseHref , 'get' ) ; } return $ links ; }
Returns an array of Link objects for the nodes in the list.

@return Link[] An array of Link instances

@throws \InvalidArgumentException If the current node list contains non-DOMElement instances
Returns an array of Link objects for the nodes in the list .