Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public function discover(Resource $resource) |
||
40 | { |
||
41 | $crawler = $this->getFilteredCrawler($resource); |
||
42 | |||
43 | $uris = array(); |
||
44 | foreach ($crawler as $node) { |
||
45 | try { |
||
46 | $uris[] = new DiscoveredUri(new Uri($node->getAttribute('href'), $resource->getUri()->toString())); |
||
47 | } catch (UriSyntaxException $e) { |
||
48 | // do nothing. We simply ignore invalid URI's |
||
49 | } |
||
50 | } |
||
51 | return $uris; |
||
52 | } |
||
53 | } |
||
54 |