summaryrefslogtreecommitdiff
path: root/platform/www/inc/FeedParser.php
diff options
context:
space:
mode:
Diffstat (limited to 'platform/www/inc/FeedParser.php')
-rw-r--r--platform/www/inc/FeedParser.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/platform/www/inc/FeedParser.php b/platform/www/inc/FeedParser.php
new file mode 100644
index 0000000..8f71b96
--- /dev/null
+++ b/platform/www/inc/FeedParser.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * We override some methods of the original SimplePie class here
+ */
+class FeedParser extends SimplePie {
+
+ /**
+ * Constructor. Set some defaults
+ */
+ public function __construct(){
+ parent::__construct();
+ $this->enable_cache(false);
+ $this->set_file_class(\dokuwiki\FeedParserFile::class);
+ }
+
+ /**
+ * Backward compatibility for older plugins
+ *
+ * phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
+ * @param string $url
+ */
+ public function feed_url($url){
+ $this->set_feed_url($url);
+ }
+}
+
+