You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
679 B

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