diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-04-17 18:04:53 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-04-17 18:04:53 +0200 |
commit | 5f9846d0a9c83fe0debcf52fa9f6ad9aea4871fa (patch) | |
tree | a823ff00246c7138e19972ec1b3e0bc3f9db2006 /inc | |
parent | 8f4f35ecc495115b00825cf0483abd279f51c847 (diff) | |
download | rpg-5f9846d0a9c83fe0debcf52fa9f6ad9aea4871fa.tar.gz rpg-5f9846d0a9c83fe0debcf52fa9f6ad9aea4871fa.tar.bz2 |
add missing FeedParser.php #782
darcs-hash:20060417160453-7ad00-e54322159dbe1c1c75cd2c8494fda14a3f4bc021.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/FeedParser.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/inc/FeedParser.php b/inc/FeedParser.php new file mode 100644 index 000000000..f2aeb4e7b --- /dev/null +++ b/inc/FeedParser.php @@ -0,0 +1,33 @@ +<?php +/** + * Class used to parse RSS and ATOM feeds + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + +if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); +require_once(DOKU_INC.'inc/HTTPClient.php'); +require_once(DOKU_INC.'inc/SimplePie.php'); + + +/** + * We override some methods of the original SimplePie class here + */ +class FeedParser extends SimplePie { + + /** + * Constructor. Set some defaults + */ + function FeedParser(){ + $this->SimplePie(); + $this->caching = false; + } + + /** + * Fetch an URL using our own HTTPClient + */ + function getFile($url){ + $http = new DokuHTTPClient(); + return $http->get($url); + } +} |