1<?php
2
3use SimplePie\SimplePie;
4use dokuwiki\FeedParserFile;
5use SimplePie\File;
6
7/**
8 * We override some methods of the original SimplePie class here
9 */
10class FeedParser extends SimplePie
11{
12    /**
13     * Constructor. Set some defaults
14     */
15    public function __construct()
16    {
17        parent::__construct();
18        $this->enable_cache(false);
19        $this->registry->register(File::class, FeedParserFile::class);
20    }
21
22    /**
23     * Backward compatibility for older plugins
24     *
25     * phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
26     * @param string $url
27     */
28    public function feed_url($url)
29    {
30        $this->set_feed_url($url);
31    }
32}
33