From 10dc1e2cb4c4940981a3abd776350dc07f92fc3e Mon Sep 17 00:00:00 2001 From: filip Date: Fri, 3 Aug 2018 16:37:28 +0200 Subject: upgrade SimplePie from 1.3.1 to 1.5.2 as a part of a #mga23215 bugfix --- lib/simplepie/library/SimplePie/Copyright.php | 124 ++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 lib/simplepie/library/SimplePie/Copyright.php (limited to 'lib/simplepie/library/SimplePie/Copyright.php') diff --git a/lib/simplepie/library/SimplePie/Copyright.php b/lib/simplepie/library/SimplePie/Copyright.php new file mode 100644 index 000000000..a57f323e6 --- /dev/null +++ b/lib/simplepie/library/SimplePie/Copyright.php @@ -0,0 +1,124 @@ +` copyright tags as defined in Media RSS + * + * Used by {@see SimplePie_Enclosure::get_copyright()} + * + * This class can be overloaded with {@see SimplePie::set_copyright_class()} + * + * @package SimplePie + * @subpackage API + */ +class SimplePie_Copyright +{ + /** + * Copyright URL + * + * @var string + * @see get_url() + */ + var $url; + + /** + * Attribution + * + * @var string + * @see get_attribution() + */ + var $label; + + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + */ + public function __construct($url = null, $label = null) + { + $this->url = $url; + $this->label = $label; + } + + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + /** + * Get the copyright URL + * + * @return string|null URL to copyright information + */ + public function get_url() + { + if ($this->url !== null) + { + return $this->url; + } + + return null; + } + + /** + * Get the attribution text + * + * @return string|null + */ + public function get_attribution() + { + if ($this->label !== null) + { + return $this->label; + } + + return null; + } +} -- cgit v1.2.1