FeedParser.php 658 B

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