// SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue
// SPDX-License-Identifier: BSD-3-Clause
* Handles `<media:credit>` as defined in Media RSS
* Used by {@see \SimplePie\Enclosure::get_credit()} and {@see \SimplePie\Enclosure::get_credits()}
* This class can be overloaded with {@see \SimplePie\SimplePie::set_credit_class()}
* Constructor, used to input the data
* For documentation on all the parameters, see the corresponding
* properties and their accessors
public function __construct(
public function __toString()
// There is no $this->data here
return md5(serialize($this));
* Get the role of the person receiving credit
public function get_role()
if ($this->role !== null) {
* Get the organizational scheme
public function get_scheme()
if ($this->scheme !== null) {
* Get the credited person/entity's name
public function get_name()
if ($this->name !== null) {
class_alias('SimplePie\Credit', 'SimplePie_Credit');