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