Révision ed9a13f1
Ajouté par Assos Assos il y a plus de 3 ans
drupal7/sites/all/modules/feeds/plugins/FeedsSitemapParser.inc | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* A parser for the Sitemap specification http://www.sitemaps.org/protocol.php |
|
9 |
* A parser for the Sitemap specification http://www.sitemaps.org/protocol.php.
|
|
10 | 10 |
*/ |
11 | 11 |
class FeedsSitemapParser extends FeedsParser { |
12 |
|
|
12 | 13 |
/** |
13 | 14 |
* Implements FeedsParser::parse(). |
14 | 15 |
*/ |
... | ... | |
16 | 17 |
// Set time zone to GMT for parsing dates with strtotime(). |
17 | 18 |
$tz = date_default_timezone_get(); |
18 | 19 |
date_default_timezone_set('GMT'); |
19 |
// Yes, using a DOM parser is a bit inefficient, but will do for now |
|
20 |
// Yes, using a DOM parser is a bit inefficient, but will do for now.
|
|
20 | 21 |
$xml = new SimpleXMLElement($fetcher_result->getRaw()); |
21 | 22 |
$result = new FeedsParserResult(); |
22 | 23 |
foreach ($xml->url as $url) { |
... | ... | |
59 | 60 |
), |
60 | 61 |
) + parent::getMappingSources(); |
61 | 62 |
} |
63 |
|
|
62 | 64 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules